X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/e967efd5e9745242298f8792cb7d47dca141bfbf..a07675e1d9fe1344f04b9d436c8de174d086c480:/Library/firmware.sh diff --git a/Library/firmware.sh b/Library/firmware.sh index ac1381db..6dcb4a21 100755 --- a/Library/firmware.sh +++ b/Library/firmware.sh @@ -8,7 +8,7 @@ shopt -s nullglob version=$(sw_vers -productVersion) cpu=$(uname -p) -if [[ ${cpu} == arm ]]; then +if [[ ${cpu} == arm || ${cpu} == arm64 ]]; then data=/var/lib/dpkg model=hw.machine arch=iphoneos-arm @@ -41,6 +41,7 @@ Installed-Size: 0 Architecture: ${arch} Version: ${version} Description: ${description} +Maintainer: Jay Freeman (saurik) Tag: role::cydia EOF @@ -49,6 +50,12 @@ EOF } # }}} +before=$(stat -c '%i-%Y' status) + +output=$(mktemp status-tmp.XXXXXX) +xxxxxx=${output##status-tmp.} +rm -f status-tmp.!("${xxxxxx}") + { # Delete Old Packages {{{ @@ -87,7 +94,7 @@ EOF fi # }}} - if [[ ${cpu} == arm ]]; then + if [[ ${cpu} == arm || ${cpu} == arm64 ]]; then pseudo "firmware" "${version}" "almost impressive Apple frameworks" "iOS Firmware" while [[ 1 ]]; do @@ -101,19 +108,22 @@ EOF echo "${gssc}" | sed -re ' /^ [^ ]* = [0-9.]*;$/ ! d; s/^ ([^ ]*) = ([0-9.]*);$/\1 \2/; - s/([A-Z])/-\L\1/g; s/^"([^ ]*)"/\1/; + s/([A-Z])/-\L\1/g; + s/^"([^ ]*)"/\1/; s/^-//; / 0$/ d; - ' | while read -r name value; do - pseudo "gsc.${name}" "${value}" "virtual GraphicsServices dependency" - - if [[ ${name} == ipad ]]; then - pseudo "gsc.wildcat" "${value}" "virtual virtual GraphicsServices dependency" - fi - done + ' | while read -r name value; do case "${name}" in + (ipad) for name in ipad wildcat; do + pseudo "gsc.${name}" "${value}" "this device has a very large screen" "iPad" + done;; + + (*) + pseudo "gsc.${name}" "${value}" "virtual GraphicsServices dependency" + ;; + esac; done fi - if [[ ${cpu} == arm ]]; then + if [[ ${cpu} == arm || ${cpu} == arm64 ]]; then os=ios else os=macosx @@ -132,14 +142,16 @@ EOF pseudo "cy+lib.corefoundation" "$(/usr/libexec/cydia/cfversion)" "virtual corefoundation dependency" -} >"${status}"_ +} >"${output}" -mv -f "${status}"{_,} +# XXX: this is a poor replacement for flock +test "${before}" = "$(stat -c '%i-%Y' status)" +mv -f "${output}" "${status}" -if [[ ${cpu} == arm ]]; then +if [[ ${cpu} == arm || ${cpu} == arm64 ]]; then if [[ ! -h /User && -d /User ]]; then cp -afT /User /var/mobile fi && rm -rf /User && ln -s "/var/mobile" /User - echo 5 >/var/lib/cydia/firmware.ver + echo 6 >/var/lib/cydia/firmware.ver fi