This commit is contained in:
Santiago Lo Coco 2022-01-20 12:18:32 -03:00
parent accb99b0dc
commit 4c6afc1b69
1 changed files with 11 additions and 7 deletions

View File

@ -30,8 +30,8 @@ checkParameters() {
setDialogBox "whiptail" setDialogBox "whiptail"
setLogToFile true "$(pwd -P)" setLogToFile true "$(pwd -P)"
;; ;;
-p | --packages) -p | --packages)
runUserScripts=true userScriptsFlag=true
;; ;;
*) *)
printf '%s: invalid option %s\n' "${0##*/}" "$1" printf '%s: invalid option %s\n' "${0##*/}" "$1"
@ -104,11 +104,8 @@ checkForDependencies() {
fi fi
} }
startRice() { runUserScripts() {
displayDialogBox --title "sadedot" --msgbox "Hi! This script will auto install my dotfiles." if [[ -n $userScriptsFlag && $userScriptsFlag = true ]]; then
getGitconfigData
source scripts/linkFiles.sh
if [[ -n $runUserScripts && $runUserScripts = true ]]; then
lastFolder=$(pwd -P) lastFolder=$(pwd -P)
cd .. || { echo "Couldn't cd into parent folder." 1>&2 && exit 1; } cd .. || { echo "Couldn't cd into parent folder." 1>&2 && exit 1; }
for script in $(find -H scripts -type f); do for script in $(find -H scripts -type f); do
@ -116,6 +113,13 @@ startRice() {
done done
cd "$lastFolder" || { echo "Couldn't cd into '$lastFolder'." 1>&2 && exit 1; } cd "$lastFolder" || { echo "Couldn't cd into '$lastFolder'." 1>&2 && exit 1; }
fi fi
}
startRice() {
displayDialogBox --title "sadedot" --msgbox "Hi! This script will auto install my dotfiles."
getGitconfigData
source scripts/linkFiles.sh
runUserScripts
displayDialogBox --title "sadedot" --msgbox "All done! Enjoy..." displayDialogBox --title "sadedot" --msgbox "All done! Enjoy..."
} }