diff --git a/install.sh b/install.sh index e51ae174ba..bf27ee9e87 100755 --- a/install.sh +++ b/install.sh @@ -30,7 +30,7 @@ EOF : "${uninstall:=false}" _msg() { - echo "=>" "$@" >&2 + echo "=>" "$@" } _rm() { @@ -78,7 +78,7 @@ _install() { done # Try to restore the color of folders from a config - if which papirus-folders > /dev/null 2>&1; then + if command -v papirus-folders >/dev/null; then papirus-folders -R || true fi } diff --git a/tools/_scour.sh b/tools/_scour.sh index 3933d0171a..b18e4357d9 100755 --- a/tools/_scour.sh +++ b/tools/_scour.sh @@ -22,7 +22,7 @@ set -e for i in "$@"; do if [ -f "$i" ] && [ ! -L "$i" ]; then - # is a file and is not a symlink + # it's a file and not a symlink # continue if an extension is svg [ "${i##*.}" = "svg" ] || continue diff --git a/tools/build_color_folders.sh b/tools/build_color_folders.sh index 34ddaf005b..9192f68f38 100755 --- a/tools/build_color_folders.sh +++ b/tools/build_color_folders.sh @@ -71,11 +71,11 @@ COLORS=( headline() { - printf "%b => %b%s\n" "\e[1;32m" "\e[0m" "$*" >&2 + printf "%b => %b%s\n" "\e[1;32m" "\e[0m" "$*" } msg() { - printf "%b [+] %b%s\n" "\e[1;33m" "\e[0m" "$*" >&2 + printf "%b [+] %b%s\n" "\e[1;33m" "\e[0m" "$*" } recolor() { diff --git a/tools/ffsvg.sh b/tools/ffsvg.sh index 1c5c294a2a..96f52fe59a 100755 --- a/tools/ffsvg.sh +++ b/tools/ffsvg.sh @@ -21,7 +21,7 @@ set -e SCRIPT_DIR="$(dirname "$0")" _run_helpers() { - echo "=> Working on '$1' ..." >&2 + echo "=> Working on '$1' ..." # optimize a SVG if command -v svgo > /dev/null 2>&1; then @@ -31,7 +31,7 @@ _run_helpers() { # use scour "$SCRIPT_DIR/_scour.sh" "$1" else - cat <<-'EOF' + cat >&2 <<-'EOF' You have to install svgo or scour to use this script: @@ -55,10 +55,10 @@ _run_helpers() { for i in "$@"; do if [ -d "$i" ]; then - # is a directory + # it's a directory - echo "=> Directory '$i' will be processed." >&2 - echo " Press to abort (wait 1 seconds) ..." >&2 + echo "=> Directory '$i' will be processed." + echo " Press to abort (wait 1 seconds) ..." sleep 1 @@ -67,7 +67,7 @@ for i in "$@"; do _run_helpers "$file" done elif [ -f "$i" ] && [ ! -L "$i" ]; then - # is a file and is not a symlink + # it's a file and not a symlink # continue if an extension is svg [ "${i##*.}" = "svg" ] || continue diff --git a/tools/work/get-from-theme.sh b/tools/work/get-from-theme.sh index c8103ef0d3..3064f8266d 100755 --- a/tools/work/get-from-theme.sh +++ b/tools/work/get-from-theme.sh @@ -56,7 +56,7 @@ find "$SOURCE_DIR/Papirus" -type f -name '*.svg' | grep "$CONTEXT_DIR" | \ base_dir=$(basename "$(dirname "$top_dir")") size=$(basename "$top_dir") context=$(basename "$src_dir") - filename=$(basename --suffix=".svg" "$file") + filename=$(basename "$file" .svg) mkdir -p "$SCRIPT_DIR/$base_dir/$context/" cp -v "$file" "$SCRIPT_DIR/$base_dir/$context/$filename@$size.svg" diff --git a/tools/work/put-into-theme.sh b/tools/work/put-into-theme.sh index e068641bd1..afc28c9398 100755 --- a/tools/work/put-into-theme.sh +++ b/tools/work/put-into-theme.sh @@ -15,7 +15,7 @@ find "${THEMES[@]/$TARGET_DIR/$SCRIPT_DIR}" -name '*.svg' | \ while read -r file; do src_dir=$(dirname "$file") top_dir=$(dirname "$src_dir") - base_name=$(basename --suffix=".svg" "$file") + base_name=$(basename "$file" .svg) base_dir=$(basename "$top_dir") context=$(basename "$src_dir")