X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/e057ec0557665e0ba48cd0a4c8046eda3b917d32..1636cf2976bbc6940ec85b3a41017492db9f17fa:/Library/firmware.sh diff --git a/Library/firmware.sh b/Library/firmware.sh index a45fd218..0ad61754 100755 --- a/Library/firmware.sh +++ b/Library/firmware.sh @@ -1,22 +1,21 @@ #!/bin/bash +set -e version=$(sw_vers -productVersion) -if grep '^Package: firmware$' /var/lib/dpkg/status >/dev/null; then - cat /var/lib/dpkg/status | while IFS= read -r line; do - if [[ ${line} == 'Package: firmware' ]]; then - firmware= - elif [[ ${line} == '' ]]; then - unset firmware - elif [[ ${line} == Version:* && "${firmware+@}" ]]; then - echo "Version: ${version}" - continue - fi - - echo "${line}" - done >/var/lib/dpkg/status_ -else - cat /var/lib/dpkg/status - >/var/lib/dpkg/status_ </var/lib/dpkg/status_ + +cat >>/var/lib/dpkg/status_ < -Architecture: darwin-arm +Architecture: iphoneos-arm Version: ${version} Description: almost impressive Apple frameworks Name: iPhone Firmware EOF -fi && mv -f /var/lib/dpkg/status{_,} + +mv -f /var/lib/dpkg/status{_,} echo "/." >/var/lib/dpkg/info/firmware.list