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 11, 2018
1 parent e5bf28f commit 0739107
Showing 1 changed file with 46 additions and 46 deletions.
92 changes: 46 additions & 46 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 @@ -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 Expand Up @@ -309,8 +309,8 @@ for link in $links; do
if [[ $link == *folder_color* ]]; then
continue
fi
newlink=$(readlink "${link}");
subfolder=$(dirname "${link}");
newlink=$(readlink "${link}")
subfolder=$(dirname "${link}")
subfolder=${subfolder#${sdir}/Numix/}
if [[ $newlink == *"$currentcolour"* ]]; then
newlink=${newlink/${currentcolour}/${colour}}
Expand Down

0 comments on commit 0739107

Please sign in to comment.