]>
git.saurik.com Git - cydia.git/blob - Library/firmware.sh
8 version
=$(sw_vers -productVersion)
11 if [[ ${cpu} == arm
]]; then
16 data
=/Library
/Cydia
/dpkg
21 model
=$(sysctl -n "${model}")
26 sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'
29 # Generate New Package {{{
31 local package
=$1 version
=$2 description
=$3 name
=$4
32 echo "/." >"${data}"/info
/"${package}".list
37 Status: install ok installed
43 Description: ${description}
47 [[ -n ${name} ]] && echo "Name: ${name}"
54 # Delete Old Packages {{{
58 while IFS
= read -r line
; do
59 #echo "#${firmware+@}/${blank+@} ${line}" 1>&2
61 if [[ ${line} == '' && "${blank+@}" ]]; then
67 if [[ ${line} == "Package: "@
(firmware
|gsc.
*|cy
+*) ]]; then
69 elif [[ ${line} == '' ]]; then
73 if [[ "${firmware+@}" ]]; then
74 if [[ "${blank+@}" ]]; then
80 #echo "${firmware+@}/${blank+@} ${line}" 1>&2
84 #echo "#${firmware+@}/${blank+@} EOF" 1>&2
85 if ! [[ "${blank+@}" || "${firmware+@}" ]]; then
90 if [[ ${cpu} == arm
]]; then
91 pseudo
"firmware" "${version}" "almost impressive Apple frameworks" "iOS Firmware"
95 if [[ ${gssc} != *'(null)'* ]]; then
101 echo "${gssc}" | sed -re '
102 /^ [^ ]* = [0-9.]*;$/ ! d;
103 s/^ ([^ ]*) = ([0-9.]*);$/\1 \2/;
104 s/([A-Z])/-\L\1/g; s/^"([^ ]*)"/\1/;
107 ' | while read -r name value
; do case "${name}" in
108 (ipad
) for name
in ipad wildcat
; do
109 pseudo
"gsc.${name}" "${value}" "this device has a very large screen" "iPad"
113 pseudo
"gsc.${name}" "${value}" "virtual GraphicsServices dependency"
118 if [[ ${cpu} == arm
]]; then
124 pseudo
"cy+os.${os}" "${version}" "virtual operating system dependency"
125 pseudo
"cy+cpu.${cpu}" "0" "virtual CPU dependency"
127 name
=${model%%*([0-9]),*([0-9])}
128 version
=${model#${name}}
129 name
=$(lower <<<${name})
130 version
=${version/,/.}
131 pseudo
"cy+model.${name}" "${version}" "virtual model dependency"
133 pseudo
"cy+kernel.$(lower <<<$(sysctl -n kern.ostype))" "$(sysctl -n kern.osrelease)" "virtual kernel dependency"
135 pseudo
"cy+lib.corefoundation" "$(/usr/libexec/cydia/cfversion)" "virtual corefoundation dependency"
139 mv -f "${status}"{_
,}
141 if [[ ${cpu} == arm
]]; then
142 if [[ ! -h /User
&& -d /User
]]; then
143 cp -afT /User
/var
/mobile
144 fi && rm -rf /User
&& ln -s "/var/mobile" /User
146 echo 6 >/var
/lib
/cydia
/firmware.ver