summaryrefslogtreecommitdiff
path: root/Library/firmware.sh
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-04-30 18:51:21 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:14:00 +0000
commit01d93940f58b871f8a4899e4bd2b7c7752976886 (patch)
treee34df7c766fe07b342635dfa8cd59e8a390b6977 /Library/firmware.sh
parent4e4059807eba861d5a6c43e071c8861dfb7a70b4 (diff)
Added tokens, cydia::obsolete, faster search, header parsing, long descriptions on iPad, wide tables, abstracted dropBar, singleton keyboard, lazy panels, GraphicsServices capabilities, portrait-only, and ISOLatin1 fallback.
Diffstat (limited to 'Library/firmware.sh')
-rwxr-xr-xLibrary/firmware.sh39
1 files changed, 35 insertions, 4 deletions
diff --git a/Library/firmware.sh b/Library/firmware.sh
index e91eef3..bb5c228 100755
--- a/Library/firmware.sh
+++ b/Library/firmware.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+
set -e
+shopt -s extglob
version=$(sw_vers -productVersion)
@@ -14,7 +16,7 @@ while IFS= read -r line; do
unset blank
fi
- if [[ ${line} == 'Package: firmware' ]]; then
+ if [[ ${line} == "Package: "@(firmware|gsc.*) ]]; then
firmware=
elif [[ ${line} == '' ]]; then
blank=
@@ -43,20 +45,47 @@ Status: install ok installed
Priority: required
Section: System
Installed-Size: 0
-Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
Architecture: iphoneos-arm
Version: ${version}
Description: almost impressive Apple frameworks
Name: iPhone Firmware
+Tag: role::cydia
+
+EOF
+
+echo "/." >/var/lib/dpkg/info/firmware.list
+
+gssc 2>&1 | sed -re '
+ /^ [^ ]* = [0-9.]*;$/ ! d;
+ s/^ ([^ ]*) = ([0-9.]*);$/\1 \2/;
+ s/([A-Z])/-\L\1/g; s/^"([^ ]*)"/\1/;
+ s/^-//;
+ / 0$/ d;
+' | while read -r name value; do
+
+cat <<EOF
+Package: gsc.${name}
+Essential: yes
+Status: install ok installed
+Priority: required
+Section: System
+Installed-Size: 0
+Architecture: iphoneos-arm
+Version: ${value}
+Description: GraphicsService Capability Bit
+Name: GSC: ${name}
+Tag: role::cydia
EOF
+echo "/." >/var/lib/dpkg/info/gsc."${name}".list
+
+done
+
} >/var/lib/dpkg/status_
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
@@ -66,3 +95,5 @@ fi
if [[ ! -h /User && -d /User ]]; then
cp -afT /User /var/"${user}"
fi && rm -rf /User && ln -s "/var/${user}" /User
+
+echo 1 >/var/lib/cydia/firmware.ver