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 /yf-update | |
parent | 1d08899c3ac82047fe614a7694e5a7235f808cfd (diff) |
Be very careful about using $0.
Diffstat (limited to 'yf-update')
-rwxr-xr-x | yf-update | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,17 +1,17 @@ #!/bin/bash -source $(dirname $0)/local_config -source $(dirname $0)/config -source $(dirname $0)/libremessages +source "$(dirname "$(readlink -e "$0")")/local_config" +source "$(dirname "$(readlink -e "$0")")/config" +source "$(dirname "$(readlink -e "$0")")/libremessages" blacklist_mtime=$(printf "%.0f" $(find ${blacklist} -printf "%T@")) -last_bl_mtime=$(cat $(dirname $0)/yftime) +last_bl_mtime=$(cat "$(dirname "$(readlink -e "$0")")/yftime") if [ $blacklist_mtime -gt $last_bl_mtime ]; then - pushd $(dirname $0)/yf + pushd "$(dirname "$(readlink -e "$0")")/yf" makepkg -f find . -name "*${PKGEXT}" -exec mv {} ${STAGING}/libre \; popd - echo ${blacklist_mtime} > $(dirname $0)/yftime + echo ${blacklist_mtime} > "$(dirname "$(readlink -e "$0")")/yftime" msg2 "built and staged" else msg2 "nothing to do" |