]>
git.saurik.com Git - cydia.git/blob - Library/firmware.sh
8 version
=$(sw_vers -productVersion)
11 if [[ ${cpu} == arm
|| ${cpu} == arm64
]]; 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
|| ${cpu} == arm64
]]; 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/;
108 ' | while read -r name value
; do case "${name}" in
109 (ipad
) for name
in ipad wildcat
; do
110 pseudo
"gsc.${name}" "${value}" "this device has a very large screen" "iPad"
114 pseudo
"gsc.${name}" "${value}" "virtual GraphicsServices dependency"
119 if [[ ${cpu} == arm
|| ${cpu} == arm64
]]; then
125 pseudo
"cy+os.${os}" "${version}" "virtual operating system dependency"
126 pseudo
"cy+cpu.${cpu}" "0" "virtual CPU dependency"
128 name
=${model%%*([0-9]),*([0-9])}
129 version
=${model#${name}}
130 name
=$(lower <<<${name})
131 version
=${version/,/.}
132 pseudo
"cy+model.${name}" "${version}" "virtual model dependency"
134 pseudo
"cy+kernel.$(lower <<<$(sysctl -n kern.ostype))" "$(sysctl -n kern.osrelease)" "virtual kernel dependency"
136 pseudo
"cy+lib.corefoundation" "$(/usr/libexec/cydia/cfversion)" "virtual corefoundation dependency"
140 mv -f "${status}"{_
,}
142 if [[ ${cpu} == arm
|| ${cpu} == arm64
]]; then
143 if [[ ! -h /User
&& -d /User
]]; then
144 cp -afT /User
/var
/mobile
145 fi && rm -rf /User
&& ln -s "/var/mobile" /User
147 echo 6 >/var
/lib
/cydia
/firmware.ver