X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/069ee7886cc06b3db4a8d67f2a03a2f4e8d30fa6..8c346d337c4b10013d1c81c39e4f3d526e9d3049:/Library/firmware.sh?ds=sidebyside diff --git a/Library/firmware.sh b/Library/firmware.sh index 6dcb4a21..f7479ba8 100755 --- a/Library/firmware.sh +++ b/Library/firmware.sh @@ -50,11 +50,10 @@ EOF } # }}} -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) +chmod 644 "${output}" +xxxxxx=${output##*/status-tmp.} +rm -f "${data}"/status-tmp.!("${xxxxxx}") { @@ -144,8 +143,6 @@ rm -f status-tmp.!("${xxxxxx}") } >"${output}" -# XXX: this is a poor replacement for flock -test "${before}" = "$(stat -c '%i-%Y' status)" mv -f "${output}" "${status}" if [[ ${cpu} == arm || ${cpu} == arm64 ]]; then