]>
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 before
=$(stat -c '%i-%Y' status)
55 output
=$(mktemp status-tmp.XXXXXX)
56 xxxxxx
=${output##status-tmp.}
57 rm -f status
-tmp.
!("${xxxxxx}")
61 # Delete Old Packages {{{
65 while IFS
= read -r line
; do
66 #echo "#${firmware+@}/${blank+@} ${line}" 1>&2
68 if [[ ${line} == '' && "${blank+@}" ]]; then
74 if [[ ${line} == "Package: "@
(firmware
|gsc.
*|cy
+*) ]]; then
76 elif [[ ${line} == '' ]]; then
80 if [[ "${firmware+@}" ]]; then
81 if [[ "${blank+@}" ]]; then
87 #echo "${firmware+@}/${blank+@} ${line}" 1>&2
91 #echo "#${firmware+@}/${blank+@} EOF" 1>&2
92 if ! [[ "${blank+@}" || "${firmware+@}" ]]; then
97 if [[ ${cpu} == arm
|| ${cpu} == arm64
]]; then
98 pseudo
"firmware" "${version}" "almost impressive Apple frameworks" "iOS Firmware"
102 if [[ ${gssc} != *'(null)'* ]]; then
108 echo "${gssc}" | sed -re '
109 /^ [^ ]* = [0-9.]*;$/ ! d;
110 s/^ ([^ ]*) = ([0-9.]*);$/\1 \2/;
115 ' | while read -r name value
; do case "${name}" in
116 (ipad
) for name
in ipad wildcat
; do
117 pseudo
"gsc.${name}" "${value}" "this device has a very large screen" "iPad"
121 pseudo
"gsc.${name}" "${value}" "virtual GraphicsServices dependency"
126 if [[ ${cpu} == arm
|| ${cpu} == arm64
]]; then
132 pseudo
"cy+os.${os}" "${version}" "virtual operating system dependency"
133 pseudo
"cy+cpu.${cpu}" "0" "virtual CPU dependency"
135 name
=${model%%*([0-9]),*([0-9])}
136 version
=${model#${name}}
137 name
=$(lower <<<${name})
138 version
=${version/,/.}
139 pseudo
"cy+model.${name}" "${version}" "virtual model dependency"
141 pseudo
"cy+kernel.$(lower <<<$(sysctl -n kern.ostype))" "$(sysctl -n kern.osrelease)" "virtual kernel dependency"
143 pseudo
"cy+lib.corefoundation" "$(/usr/libexec/cydia/cfversion)" "virtual corefoundation dependency"
147 # XXX: this is a poor replacement for flock
148 test "${before}" = "$(stat -c '%i-%Y' status)"
149 mv -f "${output}" "${status}"
151 if [[ ${cpu} == arm
|| ${cpu} == arm64
]]; then
152 if [[ ! -h /User
&& -d /User
]]; then
153 cp -afT /User
/var
/mobile
154 fi && rm -rf /User
&& ln -s "/var/mobile" /User
156 echo 6 >/var
/lib
/cydia
/firmware.ver