diff --git a/install.sh b/install.sh index c33d26d..805b3eb 100755 --- a/install.sh +++ b/install.sh @@ -488,8 +488,11 @@ installOtherPackages() { } finishInstallation() { - cp calsais /mnt/usr/bin/calsais - echo "sh /usr/bin/calsais && logout" >> /mnt/home/slococo/.bashrc + if [ "$cdotfisInstall" = true ]; then + [ -z "$username" ] && tryLoadVar "username" + cp calsais /mnt/usr/bin/calsais + echo "sh /usr/bin/calsais && logout" >> "/mnt/home/$username/.bashrc" + fi rm -f /mnt/cocoScript umount -R /mnt dialog --yesno "\nFinally, the PC needs to restart, would you like to restart now?" 8 47 @@ -505,7 +508,7 @@ getDotfiles() { cd "$HOME/Documents" || printAndExit "Couldn't cd into $HOME/Documents" git clone --recursive "https://codeberg.org/slococo/cdotfis.git" 2>&1 | debug cd cdotfis || printAndExit "Couldn't cd into ./cdotfis" - sh sadedot/scripts/bootstrap.sh + sh sadedot/scripts/bootstrap.sh -p cd "$lastFolder" || printAndExit "Couldn't cd into $lastFolder" sudo rm -f ~/.bashrc /usr/bin/calsais @@ -574,6 +577,7 @@ usage: ${0##*/} [command] -d Print log to STDOUT and calsais.log file. -f Print log to calsais.log file. -s Print log to STDOUT. + -p Install cdotfis (personal dotfiles). EOF } @@ -596,13 +600,14 @@ END } runScript() { - debugFlag=false; debugFlagToFile=false; debugFlagToStdout=false - while getopts ':hdfs' flag; do + debugFlag=false; debugFlagToFile=false; debugFlagToStdout=false; cdotfisInstall=false + while getopts ':hdfsp' flag; do case $flag in h) usage && exit 0 ;; d) debugFlag=true ;; f) debugFlagToFile=true ;; s) debugFlagToStdout=true ;; + p) cdotfisInstall=true ;; ?) printf '%s: invalid option -''%s'\\n "${0##*/}" "$OPTARG" && exit 1 ;; esac done