X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/fda0e863fd40edba13706020957933243c6e59f1..de3b1ab45842f7265fae101aae296d1a2d9b7ae6:/Library/firmware.sh?ds=sidebyside diff --git a/Library/firmware.sh b/Library/firmware.sh index ee8e26a3..3edf8d08 100755 --- a/Library/firmware.sh +++ b/Library/firmware.sh @@ -1,13 +1,18 @@ #!/bin/bash +# XXX: FIX THIS!! +architecture=iphoneos-arm version=$(sw_vers -productVersion) if grep '^Package: firmware$' /var/lib/dpkg/status >/dev/null; then - cat /var/lib/dpkg/status | while read -r line; do + cat /var/lib/dpkg/status | while IFS= read -r line; do if [[ ${line} == 'Package: firmware' ]]; then firmware= elif [[ ${line} == '' ]]; then unset firmware + elif [[ ${line} == Architecture:* && "${firmware+@}" ]]; then + echo "Architecture: ${architecture}" + continue elif [[ ${line} == Version:* && "${firmware+@}" ]]; then echo "Version: ${version}" continue @@ -24,10 +29,10 @@ Priority: required Section: System Installed-Size: 0 Maintainer: Jay Freeman (saurik) -Architecture: darwin-arm +Architecture: ${architecture} Version: ${version} Description: almost impressive Apple frameworks -Name: Apple iPhone Firmware +Name: iPhone Firmware EOF fi && mv -f /var/lib/dpkg/status{_,}