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 /testing2x | |
parent | 1d08899c3ac82047fe614a7694e5a7235f808cfd (diff) |
Be very careful about using $0.
Diffstat (limited to 'testing2x')
-rwxr-xr-x | testing2x | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,10 +1,10 @@ #!/bin/bash -. "$(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) <pkgname|pkgbase> ..." + msg "usage: ${0##*/} <pkgname|pkgbase> ..." exit 1 fi @@ -54,7 +54,7 @@ for repo in 'core' 'extra'; do repo_unlock ${repo} ${pkgarch} done if [ -n "${pkgs[${repo}]}" ]; then - "$(dirname $0)/db-move" 'testing' "${repo}" ${pkgs[${repo}]} + "$(dirname "$(readlink -e "$0")")/db-move" 'testing' "${repo}" ${pkgs[${repo}]} fi done |