X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/de0dbbab58b40c0b4a2ce2b420acffb4a643f1c3..853d14d30b0f905c441a66b1ab70a63346a8bd7f:/Library/firmware.sh diff --git a/Library/firmware.sh b/Library/firmware.sh index e0ef0ab8..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,14 +29,16 @@ 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{_,} +echo "/." >/var/lib/dpkg/info/firmware.list + if [[ ${version} = 1.0* || ${version} = 1.1.[012] ]]; then user=root else