From e26c6e624fa13049be822f29fd7686da86f0b59f Mon Sep 17 00:00:00 2001 From: "Toerd@iArch" Date: Mon, 3 Dec 2018 22:08:22 +0100 Subject: [PATCH] bugfixes --- fresh.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/fresh.sh b/fresh.sh index 83816cc..21de9c4 100755 --- a/fresh.sh +++ b/fresh.sh @@ -95,7 +95,7 @@ install_manual() { msd=$((msd+1)) dialog --title "Manual packages" --infobox "Manual Package $msd/$ms\n\nInstalling: $1\n\n> $2 <" 0 0 cd "$scriptdir/packages/$1" || exit - make clean && make && make install && make clean&>> $logfile ; + make clean && make && make install && make clean &>> $logfile ; cd "/home/$uname" || exit } @@ -177,31 +177,32 @@ add_after() { # add_after "Color" 'tt="ILoveCandy"' "$HOME/test/pacman.conf" # add_after "Color" 'tt="ILoveCandy"' "$HOME/test/pacman.conf" sed -i '/'"$1"'/a '"$2"'' $3 + # BUG adds the config bit even if it already exists } add_xorg_conf() { echo "Adding xorg conf\n\n" >> $logfile - cp "$scriptdir/etc/X11/xorg.conf.d/*" /etc/X11/xorg.conf.d/ >> $logfile + cp $scriptdir/etc/X11/xorg.conf.d/* /etc/X11/xorg.conf.d/ &>> $logfile } add_udev_rules() { - echo "Adding udev rules\n\n" >> $logfile - cp "$scriptdir/etc/udev/rules.d/*" /etc/udev/rules.d/ >> $logfile + echo "Adding udev rules from $scriptdir into udev folder\n\n" >> $logfile + cp $scriptdir/etc/udev/rules.d/* /etc/udev/rules.d/ &>> $logfile } add_pacman_hooks() { echo "Adding pacman hooks\n\n" >> $logfile mkdir -p /etc/pacman.d/hooks >> $logfile - cp "$scriptdir/etc/pacman.d/hooks/*" /etc/pacman.d/hooks/ >> $logfile + cp $scriptdir/etc/pacman.d/hooks/* /etc/pacman.d/hooks/ &>> $logfile } set_pacman_config() { echo "Setting pacman conf\n\n" >> $logfile pconf="/etc/pacman.conf" - uncom "Color" $pconf >> $logfile - uncom "TotalDownload" $pconf >> $logfile - uncom "VerbosePkgLists" $pconf >> $logfile - add_after "VerbosePkgLists" "ILoveCandy" $pconf >> $logfile + uncom "Color" $pconf &>> $logfile + uncom "TotalDownload" $pconf &>> $logfile + uncom "VerbosePkgLists" $pconf &>> $logfile + add_after "VerbosePkgLists" "ILoveCandy" $pconf &>> $logfile } set_git_config() { @@ -215,15 +216,15 @@ set_system_stuff() { # locale gen echo "Enter system stuff\n\n" >> $logfile dialog --title "Setting up the system" --infobox "Final adjustments" 0 0 - localectl --no-convert set-x11-keymap us ,altgr-intl >> $logfile - setxkbmap us -variant altgr-intl >> $logfile + localectl --no-convert set-x11-keymap us ,altgr-intl &>> $logfile + setxkbmap us -variant altgr-intl &>> $logfile add_udev_rules set_pacman_config add_pacman_hooks add_xorg_conf set_git_config #link syncthing config and move certs - sudo -u $uname /home/$uname/.dotfiles/syncthing/link-confs.sh + sudo -u $uname /home/$uname/.dotfiles/syncthing/link-confs.sh &>> $logfile echo "Leave system stuff\n\n" >> $logfile } # ACTUAL ROUTINE