summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-02-02 06:29:38 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-02-02 06:29:38 -0800
commitb1b79d408f3cda3965b8d9087c334f26b7603208 (patch)
tree75aa8bf4546c15973154d69b595b0ffe5fe57458
parent5ecd43c35e8a5bb666624af9ab6279ccc78c7cf2 (diff)
firmware.sh has no assumed "current" directory :/.
-rwxr-xr-xLibrary/firmware.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/firmware.sh b/Library/firmware.sh
index 6dcb4a2..a5bdd4d 100755
--- a/Library/firmware.sh
+++ b/Library/firmware.sh
@@ -50,11 +50,11 @@ EOF
}
# }}}
-before=$(stat -c '%i-%Y' status)
+before=$(stat -c '%i-%Y' "${status}")
-output=$(mktemp status-tmp.XXXXXX)
-xxxxxx=${output##status-tmp.}
-rm -f status-tmp.!("${xxxxxx}")
+output=$(mktemp "${data}"/status-tmp.XXXXXX)
+xxxxxx=${output##*/status-tmp.}
+rm -f "${data}"/status-tmp.!("${xxxxxx}")
{
@@ -145,7 +145,7 @@ rm -f status-tmp.!("${xxxxxx}")
} >"${output}"
# XXX: this is a poor replacement for flock
-test "${before}" = "$(stat -c '%i-%Y' status)"
+test "${before}" = "$(stat -c '%i-%Y' "${status}")"
mv -f "${output}" "${status}"
if [[ ${cpu} == arm || ${cpu} == arm64 ]]; then