Root/
| |
---|---|
Source at commit 1968 created 12 years 1 month ago. By macman, Removed new sub-branch for Chimera development versions. | |
1 | #!/bin/bash␊ |
2 | ␊ |
3 | # $1 Path to store built package␊ |
4 | ␊ |
5 | packagesidentity="org.chameleon"␊ |
6 | ␊ |
7 | packagename="Chameleon"␊ |
8 | ␊ |
9 | pkgroot="${0%/*}"␊ |
10 | ␊ |
11 | COL_BLACK="\x1b[30;01m"␊ |
12 | COL_RED="\x1b[31;01m"␊ |
13 | COL_GREEN="\x1b[32;01m"␊ |
14 | COL_YELLOW="\x1b[33;01m"␊ |
15 | COL_MAGENTA="\x1b[35;01m"␊ |
16 | COL_CYAN="\x1b[36;01m"␊ |
17 | COL_WHITE="\x1b[37;01m"␊ |
18 | COL_BLUE="\x1b[34;01m"␊ |
19 | COL_RESET="\x1b[39;49;00m"␊ |
20 | ␊ |
21 | #version=$( grep I386BOOT_CHAMELEONVERSION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )␊ |
22 | version=$( cat version )␊ |
23 | stage=${version##*-}␊ |
24 | revision=$( grep I386BOOT_CHAMELEONREVISION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )␊ |
25 | builddate=$( grep I386BOOT_BUILDDATE sym/i386/vers.h | awk '{ print $3,$4 }' | tr -d '\"' )␊ |
26 | timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" )␊ |
27 | ␊ |
28 | # =================␊ |
29 | ␊ |
30 | develop=" Crazor, Dense, fassl, fxtentacle, iNDi, JrCs, Kabyl, kaitek, mackerintel, mercurysquad, munky, Slice, meklort, mozodojo, rekursor, Turbo, cparm, valv & zef "␊ |
31 | ␊ |
32 | credits=" andyvand, asereBLN, Azimut, bumby, cosmo1t, dfe, Galaxy, kalyway, Krazubu, MasterChief, netkas, sckevyn, smith@@, THeKiNG, DutchHockeyPro & Andy"␊ |
33 | ␊ |
34 | pkgdev=" blackosx, ErmaC , scrax"␊ |
35 | ␊ |
36 | # =================␊ |
37 | ␊ |
38 | distributioncount=0␊ |
39 | xmlindent=0␊ |
40 | ␊ |
41 | indent[0]="\t"␊ |
42 | indent[1]="\t\t"␊ |
43 | indent[2]="\t\t\t"␊ |
44 | indent[3]="\t\t\t\t"␊ |
45 | ␊ |
46 | main ()␊ |
47 | {␊ |
48 | ␊ |
49 | # clean up the destination path␊ |
50 | ␊ |
51 | rm -R -f "${1}"␊ |
52 | echo ""␉␊ |
53 | echo -e $COL_BLACK"␉---------------------"$COL_RESET␊ |
54 | echo -e $COL_BLACK"␉Building Slim Package"$COL_RESET␊ |
55 | echo -e $COL_BLACK"␉---------------------"$COL_RESET␊ |
56 | echo ""␊ |
57 | ␊ |
58 | outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"␊ |
59 | ␊ |
60 | # build core package␊ |
61 | ␉echo "================= Core ================="␊ |
62 | ␉((xmlindent++))␊ |
63 | ␉packagesidentity="org.chameleon.core"␊ |
64 | ␉mkdir -p ${1}/Core/Root/usr/sbin␊ |
65 | ␉mkdir -p ${1}/Core/Root/usr/local/bin␊ |
66 | ␉mkdir -p ${1}/Core/Root/usr/standalone/i386␊ |
67 | # if [ "$(ls -A "${1%/*}/i386/modules")" ]; then␊ |
68 | # echo "Modules found."␊ |
69 | # mkdir -p ${1}/Core/Root/usr/standalone/i386/modules␊ |
70 | # cp -R ${1%/*}/i386/modules ${1}/Core/Root/usr/standalone/i386␊ |
71 | # else␊ |
72 | # echo "No found modules into dir module"␊ |
73 | # fi␊ |
74 | ␉ditto --noextattr --noqtn ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386␊ |
75 | ␉ditto --noextattr --noqtn ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386␊ |
76 | ␉ditto --noextattr --noqtn ${1%/*}/i386/boot0md ${1}/Core/Root/usr/standalone/i386␊ |
77 | #␉ditto --noextattr --noqtn ${1%/*}/i386/boot0hf ${1}/Core/Root/usr/standalone/i386␊ |
78 | ␉ditto --noextattr --noqtn ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386␊ |
79 | ␉ditto --noextattr --noqtn ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386␊ |
80 | ␉ditto --noextattr --noqtn ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386␊ |
81 | ␉ditto --noextattr --noqtn ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386␊ |
82 | ␉ditto --noextattr --noqtn ${1%/*}/i386/cdboot ${1}/Core/Root/usr/standalone/i386␊ |
83 | ␉ditto --noextattr --noqtn ${1%/*}/i386/chain0 ${1}/Core/Root/usr/standalone/i386␊ |
84 | # fixperms "${1}/Core/Root/"␊ |
85 | ␉ditto --noextattr --noqtn ${1%/*}/i386/fdisk440 ${1}/Core/Root/usr/sbin␊ |
86 | ␉ditto --noextattr --noqtn ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin␊ |
87 | ␉local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )␊ |
88 | ␉echo "␉[BUILD] i386 "␊ |
89 | ␉buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1␊ |
90 | ␊ |
91 | # build Chameleon package␊ |
92 | ␉echo "================= Chameleon ================="␊ |
93 | ␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Chameleon\">"␊ |
94 | ␉choices[$((choicescount++))]="<choice\n\tid=\"Chameleon\"\n\ttitle=\"Chameleon_title\"\n\tdescription=\"Chameleon_description\"\n>\n</choice>\n"␊ |
95 | ␊ |
96 | ␉# build standard package ␊ |
97 | ␉␉mkdir -p ${1}/Standard/Root␊ |
98 | ␉␉mkdir -p ${1}/Standard/Scripts/Tools␊ |
99 | ␉␉cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts␊ |
100 | ␉␉# ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile␊ |
101 | ␉␉echo "␉[BUILD] Standard "␊ |
102 | ␉␉buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EFI']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1␊ |
103 | ␉# End build standard package ␊ |
104 | ␊ |
105 | ␉# build efi package ␊ |
106 | ␉␉mkdir -p ${1}/EFI/Root␊ |
107 | ␉␉mkdir -p ${1}/EFI/Scripts/Tools␊ |
108 | ␉␉cp -f ${pkgroot}/Scripts/EFI/* ${1}/EFI/Scripts␊ |
109 | ␉␉# ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Tools/SetFile␊ |
110 | ␉␉echo "␉[BUILD] EFI "␊ |
111 | ␉␉buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1␊ |
112 | ␉# End build efi package␊ |
113 | ␊ |
114 | ␉# build reset choice package ␊ |
115 | ␉␉mkdir -p ${1}/noboot/Root␊ |
116 | ␉␉echo "␉[BUILD] Reset choice "␊ |
117 | ␉␉buildpackage "${1}/noboot" "/tmpcham" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['EFI'])\"" >/dev/null 2>&1␊ |
118 | ␉# End build reset choice package ␊ |
119 | ␊ |
120 | ␉# build Modules package␊ |
121 | echo "================= Modules ================="␊ |
122 | ###############################␊ |
123 | # AMDGraphicsEnabler.dylib #␊ |
124 | # ATiGraphicsEnabler.dylib #␊ |
125 | # IntelGraphicsEnabler.dylib #␊ |
126 | # klibc.dylib #␊ |
127 | # NVIDIAGraphicsEnabler.dylib #␊ |
128 | # Resolution.dylib #␊ |
129 | # uClibcxx.dylib #␊ |
130 | ###############################␊ |
131 | if [ "$(ls -A "${1%/*}/i386/modules")" ]; then␊ |
132 | {␊ |
133 | outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"␊ |
134 | choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"␊ |
135 | ((xmlindent++))␊ |
136 | packagesidentity="org.chameleon.module"␊ |
137 | # -␊ |
138 | if [ -e ${1%/*}/i386/modules/AMDGraphicsEnabler.dylib ]; then␊ |
139 | {␊ |
140 | mkdir -p ${1}/AMDGraphicsEnabler/Root␊ |
141 | ditto --noextattr --noqtn ${1%/*}/i386/modules/AMDGraphicsEnabler.dylib ${1}/AMDGraphicsEnabler/Root␊ |
142 | echo "␉[BUILD] AMDGraphicsEnabler "␊ |
143 | buildpackage "${1}/AMDGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1␊ |
144 | }␊ |
145 | fi␊ |
146 | # -␊ |
147 | if [ -e ${1%/*}/i386/modules/ATiGraphicsEnabler.dylib ]; then␊ |
148 | {␊ |
149 | mkdir -p ${1}/ATiGraphicsEnabler/Root␊ |
150 | ditto --noextattr --noqtn ${1%/*}/i386/modules/ATiGraphicsEnabler.dylib ${1}/ATiGraphicsEnabler/Root␊ |
151 | echo "␉[BUILD] ATiGraphicsEnabler "␊ |
152 | buildpackage "${1}/ATiGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1␊ |
153 | }␊ |
154 | fi␊ |
155 | # -␊ |
156 | if [ -e ${1%/*}/i386/modules/IntelGraphicsEnabler.dylib ]; then␊ |
157 | {␊ |
158 | mkdir -p ${1}/IntelGraphicsEnabler/Root␊ |
159 | ditto --noextattr --noqtn ${1%/*}/i386/modules/IntelGraphicsEnabler.dylib ${1}/IntelGraphicsEnabler/Root␊ |
160 | echo "␉[BUILD] IntelGraphicsEnabler "␊ |
161 | buildpackage "${1}/IntelGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1␊ |
162 | }␊ |
163 | fi␊ |
164 | # -␊ |
165 | if [ -e ${1%/*}/i386/modules/klibc.dylib ]; then␊ |
166 | {␊ |
167 | mkdir -p ${1}/klibc/Root␊ |
168 | ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/klibc/Root␊ |
169 | echo "␉[BUILD] klibc "␊ |
170 | buildpackage "${1}/klibc" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1␊ |
171 | }␊ |
172 | fi␊ |
173 | # -␊ |
174 | if [ -e ${1%/*}/i386/modules/NVIDIAGraphicsEnabler.dylib ]; then␊ |
175 | {␊ |
176 | mkdir -p ${1}/NVIDIAGraphicsEnabler/Root␊ |
177 | ditto --noextattr --noqtn ${1%/*}/i386/modules/NVIDIAGraphicsEnabler.dylib ${1}/NVIDIAGraphicsEnabler/Root␊ |
178 | echo "␉[BUILD] NVIDIAGraphicsEnabler "␊ |
179 | buildpackage "${1}/NVIDIAGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1␊ |
180 | }␊ |
181 | fi␊ |
182 | # -␊ |
183 | if [ -e ${1%/*}/i386/modules/Resolution.dylib ]; then␊ |
184 | {␊ |
185 | mkdir -p ${1}/AutoReso/Root␊ |
186 | ditto --noextattr --noqtn ${1%/*}/i386/modules/Resolution.dylib ${1}/AutoReso/Root␊ |
187 | echo "␉[BUILD] Resolution "␊ |
188 | buildpackage "${1}/AutoReso" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1␊ |
189 | }␊ |
190 | fi␊ |
191 | # -␊ |
192 | if [ -e ${1%/*}/i386/modules/uClibcxx.dylib ]; then␊ |
193 | {␊ |
194 | mkdir -p ${1}/uClibc/Root␊ |
195 | ditto --noextattr --noqtn ${1%/*}/i386/modules/uClibcxx.dylib ${1}/uClibc/Root␊ |
196 | ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/uClibc/Root␊ |
197 | echo "␉[BUILD] uClibc++ "␊ |
198 | buildpackage "${1}/uClibc" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1␊ |
199 | }␊ |
200 | fi␊ |
201 | ((xmlindent--))␊ |
202 | outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
203 | }␊ |
204 | else␊ |
205 | {␊ |
206 | echo " -= no modules to include =-"␊ |
207 | }␊ |
208 | fi␊ |
209 | ␉# End build Modules packages␊ |
210 | ((xmlindent--))␊ |
211 | outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
212 | # End build Chameleon package␊ |
213 | ␊ |
214 | # build post install package␊ |
215 | ␉echo "================= Post ================="␊ |
216 | ␉mkdir -p ${1}/Post/Root␊ |
217 | ␉mkdir -p ${1}/Post/Scripts␊ |
218 | ␉cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts␊ |
219 | ␉echo "␉[BUILD] Post "␊ |
220 | ␉buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1␊ |
221 | ␉outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"␊ |
222 | ␊ |
223 | # build meta package␊ |
224 | ␊ |
225 | ␉makedistribution "${1}" "${2}" "${3}" "${4}" "${5}"␊ |
226 | ␊ |
227 | # clean up ␊ |
228 | ␊ |
229 | ␉rm -R -f "${1}"␊ |
230 | ␊ |
231 | }␊ |
232 | ␊ |
233 | fixperms ()␊ |
234 | {␊ |
235 | ␉# $1 path␊ |
236 | ␉find "${1}" -type f -exec chmod 644 {} \;␊ |
237 | ␉find "${1}" -type d -exec chmod 755 {} \;␊ |
238 | ␉chown -R 0:0 "${1}"␊ |
239 | }␊ |
240 | ␊ |
241 | buildpackage ()␊ |
242 | {␊ |
243 | # $1 Path to package to build containing Root and or Scripts␊ |
244 | # $2 Install Location␊ |
245 | # $3 Size␊ |
246 | # $4 Options␊ |
247 | ␊ |
248 | if [ -d "${1}/Root" ] && [ "${1}/Scripts" ]; then␊ |
249 | ␊ |
250 | ␉local packagename="${1##*/}"␊ |
251 | ␉local identifier=$( echo ${packagesidentity}.${packagename//_/.} | tr [:upper:] [:lower:] )␊ |
252 | ␉find "${1}" -name '.DS_Store' -delete␊ |
253 | ␉local filecount=$( find "${1}/Root" | wc -l )␊ |
254 | ␉if [ "${3}" ]; then␊ |
255 | ␉␉local installedsize="${3}"␊ |
256 | ␉else␊ |
257 | ␉␉local installedsize=$( du -hkc "${1}/Root" | tail -n1 | awk {'print $1'} )␊ |
258 | ␉fi␊ |
259 | ␉local header="<?xml version=\"1.0\"?>\n<pkg-info format-version=\"2\" "␊ |
260 | ␊ |
261 | ␉#[ "${3}" == "relocatable" ] && header+="relocatable=\"true\" "␉␉␊ |
262 | ␊ |
263 | ␉header+="identifier=\"${identifier}\" "␊ |
264 | ␉header+="version=\"${version}\" "␊ |
265 | ␊ |
266 | ␉[ "${2}" != "relocatable" ] && header+="install-location=\"${2}\" "␊ |
267 | ␊ |
268 | ␉header+="auth=\"root\">\n"␊ |
269 | ␉header+="\t<payload installKBytes=\"${installedsize##* }\" numberOfFiles=\"${filecount##* }\"/>\n"␊ |
270 | ␉rm -R -f "${1}/Temp"␊ |
271 | ␊ |
272 | ␉[ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp"␊ |
273 | ␉[ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom"␊ |
274 | ␊ |
275 | ␉if [ -d "${1}/Scripts" ]; then ␊ |
276 | ␉␉header+="\t<scripts>\n"␊ |
277 | ␉␉for script in $( find "${1}/Scripts" -type f \( -name 'pre*' -or -name 'post*' \) )␊ |
278 | ␉␉do␊ |
279 | ␉␉␉header+="\t\t<${script##*/} file=\"./${script##*/}\"/>\n"␊ |
280 | ␉␉done␊ |
281 | ␉␉header+="\t</scripts>\n"␊ |
282 | ␉␉chown -R 0:0 "${1}/Scripts"␊ |
283 | ␉␉pushd "${1}/Scripts" >/dev/null␊ |
284 | ␉␉find . -print | cpio -o -z -H cpio > "../Temp/Scripts"␊ |
285 | ␉␉popd >/dev/null␊ |
286 | ␉fi␊ |
287 | ␊ |
288 | ␉header+="</pkg-info>"␊ |
289 | ␉echo -e "${header}" > "${1}/Temp/PackageInfo"␊ |
290 | ␉pushd "${1}/Root" >/dev/null␊ |
291 | ␉find . -print | cpio -o -z -H cpio > "../Temp/Payload"␊ |
292 | ␉popd >/dev/null␊ |
293 | ␉pushd "${1}/Temp" >/dev/null␊ |
294 | ␊ |
295 | ␉xar -c -f "${1%/*}/${packagename// /}.pkg" --compression none .␊ |
296 | ␊ |
297 | ␉popd >/dev/null␊ |
298 | ␊ |
299 | ␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${packagename// /}\"/>"␊ |
300 | ␊ |
301 | ␉if [ "${4}" ]; then␊ |
302 | ␉␉local choiceoptions="${indent[$xmlindent]}${4}\n"␉␊ |
303 | ␉fi␊ |
304 | ␉choices[$((choicescount++))]="<choice\n\tid=\"${packagename// /}\"\n\ttitle=\"${packagename}_title\"\n\tdescription=\"${packagename}_description\"\n${choiceoptions}>\n\t<pkg-ref id=\"${identifier}\" installKBytes='${installedsize}' version='${version}.0.0.${timestamp}' auth='root'>#${packagename// /}.pkg</pkg-ref>\n</choice>\n"␊ |
305 | ␊ |
306 | ␉rm -R -f "${1}"␊ |
307 | fi␊ |
308 | }␊ |
309 | ␊ |
310 | makedistribution ()␊ |
311 | {␊ |
312 | ␉rm -f "${1%/*}/${packagename// /}"*.pkg␊ |
313 | ␊ |
314 | ␉find "${1}" -type f -name '*.pkg' -depth 1 | while read component␊ |
315 | ␉do␊ |
316 | ␉␉mkdir -p "${1}/${packagename}/${component##*/}"␊ |
317 | ␉␉pushd "${1}/${packagename}/${component##*/}" >/dev/null␊ |
318 | ␉␉xar -x -f "${1%}/${component##*/}"␊ |
319 | ␉␉popd >/dev/null␊ |
320 | ␉done␊ |
321 | ␊ |
322 | ␉ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution"␊ |
323 | ␉ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources"␊ |
324 | ␊ |
325 | ␉find "${1}/${packagename}/Resources" -type d -name '.svn' -exec rm -R -f {} \; 2>/dev/null␊ |
326 | ␊ |
327 | ␉for (( i=0; i < ${#outline[*]} ; i++));␊ |
328 | ␉␉do␊ |
329 | ␉␉␉echo -e "${outline[$i]}" >> "${1}/${packagename}/Distribution"␊ |
330 | ␉␉done␊ |
331 | ␊ |
332 | ␉for (( i=0; i < ${#choices[*]} ; i++));␊ |
333 | ␉␉do␊ |
334 | ␉␉␉echo -e "${choices[$i]}" >> "${1}/${packagename}/Distribution"␊ |
335 | ␉␉done␊ |
336 | ␊ |
337 | ␉echo "</installer-gui-script>" >> "${1}/${packagename}/Distribution"␊ |
338 | ␊ |
339 | ␉perl -i -p -e "s/%CHAMELEONVERSION%/${version%%-*}/g" `find "${1}/${packagename}/Resources" -type f`␊ |
340 | ␉perl -i -p -e "s/%CHAMELEONREVISION%/${revision}/g" `find "${1}/${packagename}/Resources" -type f`␊ |
341 | ␊ |
342 | # Adding Developer and credits␊ |
343 | ␉perl -i -p -e "s/%DEVELOP%/${develop}/g" `find "${1}/${packagename}/Resources" -type f`␊ |
344 | ␉perl -i -p -e "s/%CREDITS%/${credits}/g" `find "${1}/${packagename}/Resources" -type f`␊ |
345 | ␉perl -i -p -e "s/%PKGDEV%/${pkgdev}/g" `find "${1}/${packagename}/Resources" -type f`␊ |
346 | ␊ |
347 | ␉stage=${stage/RC/Release Candidate }␊ |
348 | ␉stage=${stage/FINAL/2.0 Final}␊ |
349 | ␉perl -i -p -e "s/%CHAMELEONSTAGE%/${stage}/g" `find "${1}/${packagename}/Resources" -type f`␊ |
350 | ␊ |
351 | ␉find "${1}/${packagename}" -name '.DS_Store' -delete␊ |
352 | ␉pushd "${1}/${packagename}" >/dev/null␊ |
353 | ␉xar -c -f "${1%/*}/$packagename.pkg" --compression none .␊ |
354 | ␉popd >/dev/null␊ |
355 | ␊ |
356 | # Here is the place for assign a Icon to the pkg␊ |
357 | ditto -xk "${pkgroot}/Icons/pkg.zip" "${pkgroot}/Icons/"␊ |
358 | DeRez -only icns "${pkgroot}/Icons/Icons/pkg.icns" > tempicns.rsrc␊ |
359 | Rez -append tempicns.rsrc -o "${1%/*}/$packagename.pkg"␊ |
360 | SetFile -a C "${1%/*}/$packagename.pkg"␊ |
361 | rm -f tempicns.rsrc␊ |
362 | rm -rf "${pkgroot}/Icons/Icons"␊ |
363 | # End␊ |
364 | ␊ |
365 | }␊ |
366 | ␊ |
367 | main "${1}" "${2}" "${3}" "${4}" "${5}"␊ |
368 | ␊ |
369 |