diff --git a/fresh.sh b/fresh.sh index a5bfe10..a6f5356 100755 --- a/fresh.sh +++ b/fresh.sh @@ -30,7 +30,7 @@ startup_msg() { init() { pacman -S --noconfirm --needed dialog git make || { echo "Run as root user"; exit; } dialog --infobox "Refresh of the Keyring" 0 0 - pacman --noconfirm -Sy archlinux-keyring &> $logfile + pacman --noconfirm -Sy archlinux-keyring &>> $logfile } pre_install() { @@ -56,7 +56,7 @@ get_credentials() { create_user() { dialog --infobox "Creating user - $uname" 0 0 - useradd -m -g wheel -s /bin/bash "$uname" &>$logfile || usermod -a -G wheel "$uname" && mkdir -p /home/"$uname" && chown "$uname":wheel /home/"$uname" + useradd -m -g wheel -s /bin/bash "$uname" &>> $logfile || usermod -a -G wheel "$uname" && mkdir -p /home/"$uname" && chown "$uname":wheel /home/"$uname" echo "$uname:$passw" | chpasswd unset passw passr ; echo "User successfully created\n\n" >> $logfile @@ -65,7 +65,7 @@ create_user() { install_pacman() { psd=$((psd+1)) dialog --title "Pacman packages" --infobox "Package $psd/$ps\n\nInstalling: $1\n\n> $2 <" 0 0 - pacman --noconfirm --needed -S "$1" &>$logfile + pacman --noconfirm --needed -S "$1" &>> $logfile } install_aur() { @@ -73,25 +73,25 @@ install_aur() { dialog --title "AUR packages" --infobox "AUR Package $asd/$as\n\nInstalling: $1\n\n> $2 <" 0 0 # is package already installed? grep "^$1$" <<< "$aur_already_installed" && return - sudo -u $uname $aurhelper -S --noconfirm "$1" $>$logfile + sudo -u $uname $aurhelper -S --noconfirm "$1" $>> $logfile } 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 && sudo -u $uname make install &>$logfile ; + make clean && make && sudo -u $uname make install &>> $logfile ; cd "/home/$uname" || exit } install_aur_helper() { dialog --title "Installing the AUR Helper" --infobox "Installing dependencies..." 0 0 - pacman --noconfirm --needed -S go &>$logfile + pacman --noconfirm --needed -S go &>> $logfile dialog --title "Installing the AUR Helper" --infobox "Cloning repository..." 0 0 dir=$(mktemp -d) - git clone https://aur.archlinux.org/yay.git "$dir" &>$logfile + git clone https://aur.archlinux.org/yay.git "$dir" &>> $logfile cd "$dir" || exit - sudo -u $uname makepkg --noconfirm -si &>$logfile + sudo -u $uname makepkg --noconfirm -si &>> $logfile } installation_loop() {