]>
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}
44 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
48 [[ -n ${name} ]] && echo "Name: ${name}"
53 output
=$(mktemp "${data}"/status-tmp.XXXXXX)
55 xxxxxx
=${output##*/status-tmp.}
56 rm -f "${data}"/status
-tmp.
!("${xxxxxx}")
60 # Delete Old Packages {{{
64 while IFS
= read -r line
; do
65 #echo "#${firmware+@}/${blank+@} ${line}" 1>&2
67 if [[ ${line} == '' && "${blank+@}" ]]; then
73 if [[ ${line} == "Package: "@
(firmware
|gsc.
*|cy
+*) ]]; then
75 elif [[ ${line} == '' ]]; then
79 if [[ "${firmware+@}" ]]; then
80 if [[ "${blank+@}" ]]; then
86 #echo "${firmware+@}/${blank+@} ${line}" 1>&2
90 #echo "#${firmware+@}/${blank+@} EOF" 1>&2
91 if ! [[ "${blank+@}" || "${firmware+@}" ]]; then
96 if [[ ${cpu} == arm
|| ${cpu} == arm64
]]; then
97 pseudo
"firmware" "${version}" "almost impressive Apple frameworks" "iOS Firmware"
101 if [[ ${gssc} != *'(null)'* ]]; then
107 echo "${gssc}" | sed -re '
108 /^ [^ ]* = [0-9.]*;$/ ! d;
109 s/^ ([^ ]*) = ([0-9.]*);$/\1 \2/;
114 ' | while read -r name value
; do case "${name}" in
115 (ipad
) for name
in ipad wildcat
; do
116 pseudo
"gsc.${name}" "${value}" "this device has a very large screen" "iPad"
120 pseudo
"gsc.${name}" "${value}" "virtual GraphicsServices dependency"
125 if [[ ${cpu} == arm
|| ${cpu} == arm64
]]; then
131 pseudo
"cy+os.${os}" "${version}" "virtual operating system dependency"
132 pseudo
"cy+cpu.${cpu}" "0" "virtual CPU dependency"
134 name
=${model%%*([0-9]),*([0-9])}
135 version
=${model#${name}}
136 name
=$(lower <<<${name})
137 version
=${version/,/.}
138 pseudo
"cy+model.${name}" "${version}" "virtual model dependency"
140 pseudo
"cy+kernel.$(lower <<<$(sysctl -n kern.ostype))" "$(sysctl -n kern.osrelease)" "virtual kernel dependency"
142 pseudo
"cy+lib.corefoundation" "$(/usr/libexec/cydia/cfversion)" "virtual corefoundation dependency"
146 mv -f "${output}" "${status}"
148 if [[ ${cpu} == arm
|| ${cpu} == arm64
]]; then
149 if [[ ! -h /User
&& -d /User
]]; then
150 cp -afT /User
/var
/mobile
151 fi && rm -rf /User
&& ln -s "/var/mobile" /User
153 echo 6 >/var
/lib
/cydia
/firmware.ver