Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/asp.in
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2018-09-13 20:35:28 -0400
committerDave Reisner <dreisner@archlinux.org>2018-09-13 20:35:28 -0400
commit95d5b778c411e6365b128f6c19fb99835669461b (patch)
treed70173155530b6c09c920e6917cd65c940495044 /asp.in
parentd1a652ddd1d56b8f4608e46890f893df2915955f (diff)
Fix some shellcheck warnings
Diffstat (limited to 'asp.in')
-rw-r--r--asp.in14
1 files changed, 7 insertions, 7 deletions
diff --git a/asp.in b/asp.in
index 99f69fe..69c3bdc 100644
--- a/asp.in
+++ b/asp.in
@@ -5,8 +5,8 @@ ARCH_GIT_REPOS=(packages community)
OPT_ARCH=$(uname -m)
OPT_FORCE=0
-: ${ASPROOT:=${XDG_CACHE_HOME:-$HOME/.cache}/asp}
-: ${ASPCACHE:=$ASPROOT/cache}
+: "${ASPROOT:=${XDG_CACHE_HOME:-$HOME/.cache}/asp}"
+: "${ASPCACHE:=$ASPROOT/cache}"
m4_include(util.inc.sh)
m4_include(remote.inc.sh)
@@ -53,12 +53,12 @@ __require_argc() {
local min max argc=$2
case $1 in
- *-*)
- IFS=- read -r min max <<<"$1"
- ;;
*-)
min=${1%-}
;;
+ *-*)
+ IFS=- read -r min max <<<"$1"
+ ;;
*)
min=$1 max=$1
;;
@@ -203,7 +203,7 @@ untrack() {
disk_usage() {
local usage
- read usage _ < <(du -sh "$ASPROOT")
+ read -r usage _ < <(du -sh "$ASPROOT")
log_info 'Using %s on disk.' "$usage"
}
@@ -311,7 +311,7 @@ dispatch_action() {
# exact match
if declare -F "action__$1" &>/dev/null; then
- "action__$@"
+ "action__$1" "${@:2}"
return
fi