diff --git a/fresh.sh b/fresh.sh index 4aa67cf..f4998fe 100755 --- a/fresh.sh +++ b/fresh.sh @@ -1,10 +1,11 @@ #!/bin/bash +# TODO: localegen etc + scriptdir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) logfile="/dev/null" todo="install" - # Get params while getopts "r:p:d:vuh" opt; do case $opt in @@ -179,28 +180,35 @@ add_after() { } add_udev_rules() { - cp "$scriptdir/udev/*" /etc/udev/rules.d/ + echo "Adding udev rules\n\n" >> $logfile + cp "$scriptdir/udev/*" /etc/udev/rules.d/ >> $logfile } add_pacman_hooks() { - mkdir -p /etc/pacman.d/hooks - cp "$scriptdir/pacman/hooks/*" /etc/pacman.d/hooks/ + echo "Adding pacman hooks\n\n" >> $logfile + mkdir -p /etc/pacman.d/hooks >> $logfile + cp "$scriptdir/pacman/hooks/*" /etc/pacman.d/hooks/ >> $logfile } set_pacman_config() { + echo "Setting pacman conf\n\n" >> $logfile pconf="/etc/pacman.conf" - uncom "Color" $pconf - uncom "TotalDownload" $pconf - uncom "VerbosePkgLists" $pconf - add_after "VerbosePkgLists" "ILoveCandy" $pconf + uncom "Color" $pconf >> $logfile + uncom "TotalDownload" $pconf >> $logfile + uncom "VerbosePkgLists" $pconf >> $logfile + add_after "VerbosePkgLists" "ILoveCandy" $pconf >> $logfile } set_system_stuff() { # locale gen - localectl --no-convert set-x11-keymap us ,altgr-intl - setxkbmap us -variant altgr-intl - set_pacman_conf + 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 add_udev_rules + set_pacman_config + add_pacman_hooks + echo "Leave system stuff\n\n" >> $logfile } # ACTUAL ROUTINE