]>
git.saurik.com Git - cydia.git/blob - Library/firmware.sh
0cf9c1dabed4e2ef47cae892687eacbb493f4af7
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 {{{
57 while IFS
= read -r line
; do
58 #echo "#${firmware+@}/${blank+@} ${line}" 1>&2
60 if [[ ${line} == '' && "${blank+@}" ]]; then
66 if [[ ${line} == "Package: "@
(firmware
|gsc.
*|cy
+*) ]]; then
68 elif [[ ${line} == '' ]]; then
72 if [[ "${firmware+@}" ]]; then
73 if [[ "${blank+@}" ]]; then
79 #echo "${firmware+@}/${blank+@} ${line}" 1>&2
83 #echo "#${firmware+@}/${blank+@} EOF" 1>&2
84 if ! [[ "${blank+@}" || "${firmware+@}" ]]; then
89 if [[ ${cpu} == arm
]]; then
90 pseudo
"firmware" "${version}" "almost impressive Apple frameworks"
93 /^ [^ ]* = [0-9.]*;$/ ! d;
94 s/^ ([^ ]*) = ([0-9.]*);$/\1 \2/;
95 s/([A-Z])/-\L\1/g; s/^"([^ ]*)"/\1/;
98 ' | while read -r name value
; do
99 pseudo
"gsc.${name}" "${value}" "virtual GraphicsServices dependency"
103 if [[ ${cpu} == arm
]]; then
109 pseudo
"cy+os.${os}" "${version}" "virtual operating system dependency"
110 pseudo
"cy+cpu.${cpu}" "0" "virtual CPU dependency"
112 name
=${model%%*([0-9]),*([0-9])}
113 version
=${model#${name}}
114 name
=$(lower <<<${name})
115 version
=${version/,/.}
116 pseudo
"cy+model.${name}" "${version}" "virtual model dependency"
118 pseudo
"cy+kernel.$(lower <<<$(sysctl -n kern.ostype))" "$(sysctl -n kern.osrelease)" "virtual kernel dependency"
122 mv -f "${status}"{_
,}
124 if [[ ${cpu} == arm
]]; then
125 if [[ ! -h /User
&& -d /User
]]; then
126 cp -afT /User
/var
/mobile
127 fi && rm -rf /User
&& ln -s "/var/mobile" /User
129 echo 3 >/var
/lib
/cydia
/firmware.ver