From 2bf259a858c59cb9063d16ba3eb9370e78f0adb3 Mon Sep 17 00:00:00 2001 From: go2null <1t1is2@gmail.com> Date: Fri, 3 May 2019 15:31:41 -0400 Subject: [PATCH 1/2] install: use XDG_CONFIG_HOME if available --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 33941a0..c546113 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,7 @@ #!/bin/sh -CSDIR="$HOME/.config/geany/colorschemes/" -echo "Installing themes into \`$CSDIR'..." + +CSDIR="${XDG_CONFIG_HOME:-$HOME/.config}/geany/colorschemes/" +echo "Installing themes into '$CSDIR'..." mkdir -p "$CSDIR" for SCHEME in `ls colorschemes/*.conf` do From 1eff056d9ba66f0870d628ba75017df34a65f0b5 Mon Sep 17 00:00:00 2001 From: go2null <1t1is2@gmail.com> Date: Fri, 3 May 2019 15:35:55 -0400 Subject: [PATCH 2/2] install: replace fragile `ls` in for loop --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index c546113..5edddc6 100755 --- a/install.sh +++ b/install.sh @@ -3,9 +3,9 @@ CSDIR="${XDG_CONFIG_HOME:-$HOME/.config}/geany/colorschemes/" echo "Installing themes into '$CSDIR'..." mkdir -p "$CSDIR" -for SCHEME in `ls colorschemes/*.conf` -do - BNAME=`basename "$SCHEME"` + +for SCHEME in colorschemes/*.conf; do + BNAME="${SCHEME##*/}" echo " => $BNAME" cp "$SCHEME" "$CSDIR" done