<commit_before>#!/bin/bash

set -e

if [[ -z $NOUPGRADE ]]; then
    sudo dnf -y upgrade --best --allowerasing
fi

sudo dnf -y --best --allowerasing install tmux atop zsh thunderbird thunderbird-enigmail thunderbird-lightning firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel meld whois curl pv nodejs npm terminator gsmartcontrol python-pip mercurial python3-devel libxslt-devel libjpeg-turbo-devel conky conky-manager redshift redshift-gtk cmake gtk2-devel intltool gparted wine solaar glances the_silver_searcher dkms kernel-devel gimp transmission-gtk git xz util-linux-user powertop dnf-automatic kdiff3 yum-utils util-linux-user ncurses-devel zeal qt5-linguist qtkeychain-qt5-devel archivemount keepass splix gutenprint-cups cups-bjnp golang redhat-rpm-config docker pcsc-lite-devel pcsc-tools pcsc-lite yubico-piv-tool yubikey-personalization-gui xloadimage

sudo dnf -y groupinstall "C Development Tools and Libraries"
sudo dnf -y groupinstall "Development Tools"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

sudo cp -v /etc/dnf/automatic.conf /etc/dnf/automatic.conf.bak
sudo cp -v $DIR/etc/dnf/automatic.conf /etc/dnf/automatic.conf
sudo cp -v $DIR/etc/ld.so.conf.d/nextcloud.conf /etc/ld.so.conf.d/nextcloud.conf
sudo cp -v $DIR/etc/sysctl.d/90_swapiness.conf /etc/sysctl.d/
sudo ldconfig

set +e
sudo diff /etc/dnf/automatic.conf.bak /etc/dnf/automatic.conf
set -e

if [[ -z $NO_SYSTEMCTL ]]; then
    sudo systemctl enable dnf-automatic.timer
    sudo systemctl start  dnf-automatic.timer
    sudo systemctl list-timers "*dnf-*"
    sudo systemctl enable docker
    sudo systemctl restart docker
fi

# docker
if [[ -z $USER ]]; then
    USER=`whoami`
fi

getent group docker || sudo groupadd docker
sudo usermod -aG docker $USER

# vscode
mkdir -p ~/Downloads
cd ~/Downloads
rm -fv *code*.rpm
aria2c "https://go.microsoft.com/fwlink/?LinkID=760867"
sudo dnf -y install code*.rpm

if [ "$(id -u)" != "0" ]; then
    code --install-extension cssho.vscode-svgviewer 
    code --install-extension donjayamanne.python
    code --install-extension saviorisdead.RustyCode
    code --install-extension seanmcbreen.Spell
    code --install-extension searKing.preview-vscode
    code --install-extension vscodevim.vim
fi

# vim
if [[ -z $NO_COMPILE_VIM ]]; then
    VIM_BUILD_DIR=/tmp
    cd "$VIM_BUILD_DIR"
    git clone https://github.com/vim/vim.git
    cd vim
    ./configure --with-features=huge \
                --enable-multibyte \
                --enable-rubyinterp \
                --enable-python3interp=yes \
                --enable-luainterp \
                --enable-gui=no \
                --enable-cscope 
    make -j2
    sudo make install
    cd
    rm -fvr "$VIM_BUILD_DIR/vim"
fi

DIR="$DIR/../"
DIR="$DIR" $DIR/common/configure_fresh_system.sh

<commit_msg>Add yp-tools to Fedora to allow for better git completion (#81)<commit_after>#!/bin/bash

set -e

if [[ -z $NOUPGRADE ]]; then
    sudo dnf -y upgrade --best --allowerasing
fi

sudo dnf -y --best --allowerasing install tmux atop zsh thunderbird thunderbird-enigmail thunderbird-lightning firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel meld whois curl pv nodejs npm terminator gsmartcontrol python-pip mercurial python3-devel libxslt-devel libjpeg-turbo-devel conky conky-manager redshift redshift-gtk cmake gtk2-devel intltool gparted wine solaar glances the_silver_searcher dkms kernel-devel gimp transmission-gtk git xz util-linux-user powertop dnf-automatic kdiff3 yum-utils util-linux-user ncurses-devel zeal qt5-linguist qtkeychain-qt5-devel archivemount keepass splix gutenprint-cups cups-bjnp golang redhat-rpm-config docker pcsc-lite-devel pcsc-tools pcsc-lite yubico-piv-tool yubikey-personalization-gui xloadimage yp-tools

sudo dnf -y groupinstall "C Development Tools and Libraries"
sudo dnf -y groupinstall "Development Tools"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

sudo cp -v /etc/dnf/automatic.conf /etc/dnf/automatic.conf.bak
sudo cp -v $DIR/etc/dnf/automatic.conf /etc/dnf/automatic.conf
sudo cp -v $DIR/etc/ld.so.conf.d/nextcloud.conf /etc/ld.so.conf.d/nextcloud.conf
sudo cp -v $DIR/etc/sysctl.d/90_swapiness.conf /etc/sysctl.d/
sudo ldconfig

set +e
sudo diff /etc/dnf/automatic.conf.bak /etc/dnf/automatic.conf
set -e

if [[ -z $NO_SYSTEMCTL ]]; then
    sudo systemctl enable dnf-automatic.timer
    sudo systemctl start  dnf-automatic.timer
    sudo systemctl list-timers "*dnf-*"
    sudo systemctl enable docker
    sudo systemctl restart docker
fi

# docker
if [[ -z $USER ]]; then
    USER=`whoami`
fi

getent group docker || sudo groupadd docker
sudo usermod -aG docker $USER

# vscode
mkdir -p ~/Downloads
cd ~/Downloads
rm -fv *code*.rpm
aria2c "https://go.microsoft.com/fwlink/?LinkID=760867"
sudo dnf -y install code*.rpm

if [ "$(id -u)" != "0" ]; then
    code --install-extension cssho.vscode-svgviewer 
    code --install-extension donjayamanne.python
    code --install-extension saviorisdead.RustyCode
    code --install-extension seanmcbreen.Spell
    code --install-extension searKing.preview-vscode
    code --install-extension vscodevim.vim
fi

# vim
if [[ -z $NO_COMPILE_VIM ]]; then
    VIM_BUILD_DIR=/tmp
    cd "$VIM_BUILD_DIR"
    git clone https://github.com/vim/vim.git
    cd vim
    ./configure --with-features=huge \
                --enable-multibyte \
                --enable-rubyinterp \
                --enable-python3interp=yes \
                --enable-luainterp \
                --enable-gui=no \
                --enable-cscope 
    make -j2
    sudo make install
    cd
    rm -fvr "$VIM_BUILD_DIR/vim"
fi

DIR="$DIR/../"
DIR="$DIR" $DIR/common/configure_fresh_system.sh


{'fraction_non_alphanumeric': 0.11145996860282574, 'fraction_numerical': 0.008023722309436595, 'mean_word_length': 3.125179856115108, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '796836', 'n_tokens_mistral': 2195, 'n_tokens_neox': 1980, 'n_words': 523}