Skip to content

Commit

Permalink
Keep shellcheck happy
Browse files Browse the repository at this point in the history
  • Loading branch information
loathingKernel committed Mar 10, 2018
1 parent e5bf28f commit 859785c
Showing 1 changed file with 50 additions and 50 deletions.
100 changes: 50 additions & 50 deletions numix-folders
Original file line number Diff line number Diff line change
Expand Up @@ -20,55 +20,55 @@ else
case "$1" in
-c|--colours)
echo -e \
"This is a list of currently supported folder\n" \
"\rcolours that can be used to replace the default.\n\n" \
"\rdefault - reverts any previous colour change\n" \
"\rblue - 42a5f5\n" \
"\rbrown - 8d6e63\n" \
"\rgreen - 66bb6a\n" \
"\rgrey - bdbdbd\n" \
"\rorange - f57c00\n" \
"\rpink - f06292\n" \
"\rpurple - 7e57c2\n" \
"\rred - ef5350\n" \
"\ryellow - ffca28\n" \
"\rstyle{#} - use colours from default style #\n" \
"\rcustom - choose your own colours"
"This is a list of currently supported folder\\n" \
"\\rcolours that can be used to replace the default.\\n\\n" \
"\\rdefault - reverts any previous colour change\\n" \
"\\rblue - 42a5f5\\n" \
"\\rbrown - 8d6e63\\n" \
"\\rgreen - 66bb6a\\n" \
"\\rgrey - bdbdbd\\n" \
"\\rorange - f57c00\\n" \
"\\rpink - f06292\\n" \
"\\rpurple - 7e57c2\\n" \
"\\rred - ef5350\\n" \
"\\ryellow - ffca28\\n" \
"\\rstyle{#} - use colours from default style #\\n" \
"\\rcustom - choose your own colours"
sucess ;;
-s|--styles)
echo -e \
"This is a list of currently supported folder\n" \
"\rstyles that can be used to replace the default.\n\n" \
"\r0 - default folder theme (uninstall)\n" \
"\r1 - the original folder design\n" \
"\r2 - plain design which matches our Legacy themes\n" \
"\r3 - tilted design which never made it to production\n" \
"\r4 - one that launched with the redesign of Circle\n" \
"\r5 - curvy design which never made it to production\n" \
"\r6 - the current new design that landed in 2015"
"This is a list of currently supported folder\\n" \
"\\rstyles that can be used to replace the default.\\n\\n" \
"\\r0 - default folder theme (uninstall)\\n" \
"\\r1 - the original folder design\\n" \
"\\r2 - plain design which matches our Legacy themes\\n" \
"\\r3 - tilted design which never made it to production\\n" \
"\\r4 - one that launched with the redesign of Circle\\n" \
"\\r5 - curvy design which never made it to production\\n" \
"\\r6 - the current new design that landed in 2015"
sucess ;;
-h|--help)
echo -e \
"A script for changing the Numix base folder\n" \
"\rstyle and colour.\n\n" \
"\rRunning as root makes the change globally,\n" \
"\rotherwise it is only made locally. Run as\n" \
"\rappropriate to your Numix installation.\n\n" \
"\rUsage: numix-folders [OPTION]\n" \
"\r -c, --colours \t List of available colours.\n" \
"\r -s, --styles \t\t List of available styles.\n" \
"\r -h, --help \t\t Displays this help menu.\n"\
"\r -p, --prev \t\t Use previous settings.\n"\
"\r -t, --cli \t\t Use script in terminal"
"A script for changing the Numix base folder\\n" \
"\\rstyle and colour.\\n\\n" \
"\\rRunning as root makes the change globally,\\n" \
"\\rotherwise it is only made locally. Run as\\n" \
"\\rappropriate to your Numix installation.\\n\\n" \
"\\rUsage: numix-folders [OPTION]\\n" \
"\\r -c, --colours \\t List of available colours.\\n" \
"\\r -s, --styles \\t\\t List of available styles.\\n" \
"\\r -h, --help \\t\\t Displays this help menu.\\n"\
"\\r -p, --prev \\t\\t Use previous settings.\\n"\
"\\r -t, --cli \\t\\t Use script in terminal"
sucess ;;
-p|--prev)
runmode=1;;
-t|--cli)
runmode=0;;
*)
echo -e \
"numix-folders: invalid option -- '$1'\n" \
"\rTry 'numix-folders --help' for more information."
"numix-folders: invalid option -- '$1'\\n" \
"\\rTry 'numix-folders --help' for more information."
gerror ;;
esac
fi
Expand Down Expand Up @@ -108,12 +108,12 @@ if [ "$runmode" -eq 2 ]; then
colour3=$(sed -n 5p "$config_file")
theme=$(sed -n 6p "$config_file")
vars=$("$scriptpath"/gui/gui "$style" "$colour" "#$colour1" "#$colour2" "#$colour3" "$theme")
style=$(echo $vars | awk '{print $1}')
colour=$(echo $vars | awk '{print $2}')
colour1=$(echo $vars | awk '{print $3}')
colour2=$(echo $vars | awk '{print $4}')
colour3=$(echo $vars | awk '{print $5}')
theme=$(echo $vars | awk '{print $6}')
style=$(echo "$vars" | awk '{print $1}')
colour=$(echo "$vars" | awk '{print $2}')
colour1=$(echo "$vars" | awk '{print $3}')
colour2=$(echo "$vars" | awk '{print $4}')
colour3=$(echo "$vars" | awk '{print $5}')
theme=$(echo "$vars" | awk '{print $6}')
if [[ -z "$style" ]]; then
exit
fi
Expand All @@ -140,8 +140,8 @@ else
fi
else
echo -e \
"You don't appear to have Numix installed! Please\n" \
"\rinstall it and run this script again."
"You don't appear to have Numix installed! Please\\n" \
"\\rinstall it and run this script again."
gerror
fi

Expand All @@ -156,8 +156,8 @@ else
style="$answer"
else
echo -e \
"Oops! You've chosen an invalid style number.\n" \
"\rRun 'numix-folders --styles' for an option list."
"Oops! You've chosen an invalid style number.\\n" \
"\\rRun 'numix-folders --styles' for an option list."
gerror
fi

Expand Down Expand Up @@ -211,8 +211,8 @@ else
function checkhex() {
if ! [[ $1 =~ ^[0-9A-Fa-f]{6}$ ]]; then
echo -e \
"Oops! The colour: $1 is an invalid hex value.\n" \
"\rBe sure to use valid hex values with six digits (e.g. 000000)."
"Oops! The colour: $1 is an invalid hex value.\\n" \
"\\rBe sure to use valid hex values with six digits (e.g. 000000)."
gerror
fi
}
Expand Down Expand Up @@ -248,8 +248,8 @@ else
colour="$answer"
else
echo -e \
"Oops! You've chosen an invalid colour.\n" \
"\rRun 'numix-folders --colours' for an option list."
"Oops! You've chosen an invalid colour.\\n" \
"\\rRun 'numix-folders --colours' for an option list."
gerror
fi
exitloop=1
Expand Down

0 comments on commit 859785c

Please sign in to comment.