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 /create-repo | |
parent | 1d08899c3ac82047fe614a7694e5a7235f808cfd (diff) |
Be very careful about using $0.
Diffstat (limited to 'create-repo')
-rwxr-xr-x | create-repo | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/create-repo b/create-repo index 58842c3..24b890d 100755 --- a/create-repo +++ b/create-repo @@ -1,11 +1,11 @@ #!/bin/bash # Creates repository structure -. "$(dirname $0)/db-functions" -. "$(dirname $0)/config" +. "$(dirname "$(readlink -e "$0")")/db-functions" +. "$(dirname "$(readlink -e "$0")")/config" if [ $# -eq 0 ]; then - msg "Usage: $0 repo1 [repo2 ... repoX]" + msg "Usage: ${0##*/} repo1 [repo2 ... repoX]" exit 1 fi @@ -21,4 +21,4 @@ for _repo in $@; do done done -msg "Don't forget to add them to the PKGREPOS array on $(dirname $0)/config" +msg "Don't forget to add them to the PKGREPOS array on %s/config" "$(dirname "$(readlink -e "$0")")" |