aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-01-15 23:35:02 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-01-15 23:35:02 +0300
commite10e5053575732765670f72fc3e9964719135f0c (patch)
treee74f6974e9fafc377b2c118431937accef8a1c69
parentREADME update (diff)
downloadconfig-links-e10e5053575732765670f72fc3e9964719135f0c.tar.gz
config-links-e10e5053575732765670f72fc3e9964719135f0c.zip
bugfix
* Add missing '--'s.
-rwxr-xr-xupdate.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/update.sh b/update.sh
index 26aac96..737510c 100755
--- a/update.sh
+++ b/update.sh
@@ -45,7 +45,7 @@ check_symlinks_enabled_cygwin() {
# Utility routines
-readonly script_argv0="$( printf '%q' "${BASH_SOURCE[0]}" )"
+readonly script_argv0="$( printf -- '%q' "${BASH_SOURCE[0]}" )"
dump() {
local prefix="${FUNCNAME[0]}"
@@ -185,13 +185,10 @@ extract_variable_name() {
local s
for s; do
local var_name
- var_name="$( expr "$s" : "$var_name_regex/" )"
-
- if [ -z "$var_name" ]; then
+ if ! var_name="$( expr "$s" : "$var_name_regex/" )"; then
dump "couldn't extract variable name from: $s" >&2
return 1
fi
-
echo "$var_name"
done
}
@@ -279,7 +276,7 @@ delete_obsolete_dirs() {
return 1
fi
- ( cd "$base_dir" && rmdir -p --ignore-fail-on-non-empty -- "$subpath" )
+ ( cd -- "$base_dir" && rmdir -p --ignore-fail-on-non-empty -- "$subpath" )
}
delete_obsolete_entries() {