]>
git.saurik.com Git - cydia.git/blob - Library/firmware.sh
ac1381dbb8846b2462cd2eee53798d3a9653937f
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
108 pseudo
"gsc.${name}" "${value}" "virtual GraphicsServices dependency"
110 if [[ ${name} == ipad
]]; then
111 pseudo
"gsc.wildcat" "${value}" "virtual virtual GraphicsServices dependency"
116 if [[ ${cpu} == arm
]]; then
122 pseudo
"cy+os.${os}" "${version}" "virtual operating system dependency"
123 pseudo
"cy+cpu.${cpu}" "0" "virtual CPU dependency"
125 name
=${model%%*([0-9]),*([0-9])}
126 version
=${model#${name}}
127 name
=$(lower <<<${name})
128 version
=${version/,/.}
129 pseudo
"cy+model.${name}" "${version}" "virtual model dependency"
131 pseudo
"cy+kernel.$(lower <<<$(sysctl -n kern.ostype))" "$(sysctl -n kern.osrelease)" "virtual kernel dependency"
133 pseudo
"cy+lib.corefoundation" "$(/usr/libexec/cydia/cfversion)" "virtual corefoundation dependency"
137 mv -f "${status}"{_
,}
139 if [[ ${cpu} == arm
]]; then
140 if [[ ! -h /User
&& -d /User
]]; then
141 cp -afT /User
/var
/mobile
142 fi && rm -rf /User
&& ln -s "/var/mobile" /User
144 echo 5 >/var
/lib
/cydia
/firmware.ver