mirror of
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git
synced 2024-10-18 01:00:35 -04:00
Minor fixes to scripts
This commit is contained in:
parent
248b6849e6
commit
e07e8f722d
6 changed files with 13 additions and 13 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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 <CTRL-C> to abort (wait 1 seconds) ..." >&2
|
||||
echo "=> Directory '$i' will be processed."
|
||||
echo " Press <CTRL-C> 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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue