Skip to content

Commit

Permalink
Revert changes to argument processing order (Fixes #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuarthayhurst committed Nov 11, 2021
1 parent 6b3d042 commit a14f644
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -450,29 +450,6 @@ else
fi
splashScreenPath="$bootPath/splash0.png"

if [[ "$programOperation" == "install" ]] || [[ "$programOperation" == "preview" ]]; then
#Check all required arguments are present and set default values
warnArgs

output "success" "Using the following settings:"
output "list" "Resolution: ${resolution^}"
if [[ "$background" != "" ]]; then
output "list" "Background: ${background^}"
else
output "list" "Background: ${backgroundColour}"
fi
iconType="${iconType:-"coloured"}"; output "list" "Icon type: ${iconType^}"
output "list" "Font colour: ${font_colour^}"
output "list" "Selected font colour: ${selected_font_colour^}"
output "list" "Font size: $fontsize"
output "list" "Font file: $fontfile"
forceBoldFont="${forceBoldFont:-"false"}"; output "list" "Force bold: ${forceBoldFont^}"

if [[ "$auto" != "true" ]]; then
output "normal" "\nPress enter to continue..."; read -r
fi
fi

if [[ "$#" == "0" ]]; then
output "error" "At least one argument is required, use './install.sh --help' to view options"; exit 1
fi
Expand Down Expand Up @@ -525,6 +502,29 @@ while [[ $i -le "$(($# - 1))" ]]; do
i=$((i + 1))
done

if [[ "$programOperation" == "install" ]] || [[ "$programOperation" == "preview" ]]; then
#Check all required arguments are present and set default values
warnArgs

output "success" "Using the following settings:"
output "list" "Resolution: ${resolution^}"
if [[ "$background" != "" ]]; then
output "list" "Background: ${background^}"
else
output "list" "Background: ${backgroundColour}"
fi
iconType="${iconType:-"coloured"}"; output "list" "Icon type: ${iconType^}"
output "list" "Font colour: ${font_colour^}"
output "list" "Selected font colour: ${selected_font_colour^}"
output "list" "Font size: $fontsize"
output "list" "Font file: $fontfile"
forceBoldFont="${forceBoldFont:-"false"}"; output "list" "Force bold: ${forceBoldFont^}"

if [[ "$auto" != "true" ]]; then
output "normal" "\nPress enter to continue..."; read -r
fi
fi

if [[ "$programOperation" == "install" ]]; then
installTheme
elif [[ "$programOperation" == "uninstall" ]]; then
Expand Down

0 comments on commit a14f644

Please sign in to comment.