summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall.sh9
-rwxr-xr-xslider4
2 files changed, 8 insertions, 5 deletions
diff --git a/install.sh b/install.sh
index efc198b..197ea0d 100755
--- a/install.sh
+++ b/install.sh
@@ -31,7 +31,10 @@ while getopts "cdhsSu:" o; do case "${o}" in
;;
s) ___USE_SSH=y ;;
S) unset ___USE_SSH ;;
- u) URL="$OPTARG" ;;
+ u)
+ SSH_BASE_URL="$OPTARG"
+ HTTP_BASE_URL="$OPTARG"
+ ;;
*) printhelp ;;
esac done
@@ -42,7 +45,7 @@ clone_dir () {
printf "%s already exists, but not as a dir; not adding.\n" "$1"
else
if [ -n "$2" ]; then
- printf "Cloning %s %s using ssh; will be read-write\nNote: only my ssh key will clone it\n" "$1"
+ printf "Cloning %s using ssh; will be read-write\nNote: only my ssh key will clone it\n" "$1"
git clone "$SSH_BASE_URL$1.git" "$1"
else
printf "Cloning %s using http; will be read-only\n" "$1"
@@ -51,7 +54,7 @@ clone_dir () {
fi
}
-echo "$SCRIPT_DIRS" | while read i; do
+echo "$SCRIPT_DIRS" | while read -r i; do
[ -z "$i" ] && continue
clone_dir "$i" "$___USE_SSH"
done
diff --git a/slider b/slider
index 6f3752f..bb45058 100755
--- a/slider
+++ b/slider
@@ -10,7 +10,7 @@
# Application cache if not stated elsewhere.
cache="${XDG_CACHE_HOME:-$HOME/.cache}/slider"
-while getopts "hvrpi:c:a:o:d:f:t:e:x:" o; do case "${o}" in
+while getopts "hvrpi:c:a:o:d:f:t:e:x:s:" o; do case "${o}" in
c) bgc="$OPTARG" ;;
t) fgc="$OPTARG" ;;
i) file="$OPTARG" ;;
@@ -65,7 +65,7 @@ if [ -n "${audio+x}" ]; then
audio/*) ;;
*) echo "That doesn't look like an audio file."; exit 1 ;;
esac
- totseconds="$(date '+%s' -d $(ffmpeg -i "$audio" 2>&1 | awk '/Duration/ {print $2}' | sed s/,//))"
+ totseconds="$(date '+%s' -d "$(ffmpeg -i "$audio" 2>&1 | awk '/Duration/ {print $2}' | sed s/,//)")"
endtime="$((totseconds-seconds))"
fi