diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-08 21:04:43 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-01-08 21:19:01 -0500 |
commit | b6e8ebd66d22abf5439485985a7851e768c71e8a (patch) | |
tree | eec7fafd8aa2285dd3b706bb1e433a0ed10c87e5 /db-list-unsigned-packages | |
parent | 1d08899c3ac82047fe614a7694e5a7235f808cfd (diff) |
Be very careful about using $0.
Diffstat (limited to 'db-list-unsigned-packages')
-rwxr-xr-x | db-list-unsigned-packages | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/db-list-unsigned-packages b/db-list-unsigned-packages index 3b5a5bd..985d1c0 100755 --- a/db-list-unsigned-packages +++ b/db-list-unsigned-packages @@ -20,11 +20,11 @@ set -e # unsigned packages available for architecture $1 and specified for # architecture $2 (usually $1 or any, default is to list all). -. "$(dirname $0)/db-functions" -. "$(dirname $0)/config" +. "$(dirname "$(readlink -e "$0")")/db-functions" +. "$(dirname "$(readlink -e "$0")")/config" if [ $# -lt 1 ]; then - msg "usage: $(basename $0) <architecture>" + msg "usage: ${0##*/} <architecture>" exit 1 fi @@ -34,5 +34,5 @@ shift for repo in ${PKGREPOS[@]} do db="${FTP_BASE}/${repo}/os/${arch}/${repo}.db" - [ -f "$db" ] && "$(dirname $0)/db-list-unsigned-packages.py" "$repo" "$@" < "$db" + [ -f "$db" ] && "$(dirname "$(readlink -e "$0")")/db-list-unsigned-packages.py" "$repo" "$@" < "$db" done |