Chameleon Applications

Chameleon Applications Svn Source Tree

Root/branches/iFabio/Chameleon/package/buildpkg.sh

  • Property svn:executable set to
Source at commit 331 created 12 years 9 months ago.
By ifabio, main C2RC5 trunk 1187, also clean chameleonprefpane sub folder
1#!/bin/bash
2
3# $1 Path to store built package
4
5packagesidentity="org.chameleon"
6
7packagename="Chameleon"
8
9pkgroot="${0%/*}"
10
11COL_BLACK="\x1b[30;01m"
12COL_RED="\x1b[31;01m"
13COL_GREEN="\x1b[32;01m"
14COL_YELLOW="\x1b[33;01m"
15COL_MAGENTA="\x1b[35;01m"
16COL_CYAN="\x1b[36;01m"
17COL_WHITE="\x1b[37;01m"
18COL_BLUE="\x1b[34;01m"
19COL_RESET="\x1b[39;49;00m"
20
21#version=$( grep I386BOOT_CHAMELEONVERSION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
22version=$( cat version )
23stage=${version##*-}
24revision=$( grep I386BOOT_CHAMELEONREVISION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
25builddate=$( grep I386BOOT_BUILDDATE sym/i386/vers.h | awk '{ print $3,$4 }' | tr -d '\"' )
26timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" )
27
28# =================
29
30develop=" Crazor, Dense, fassl, fxtentacle, iNDi, JrCs, Kabyl, kaitek, mackerintel, mercurysquad, munky, Slice, meklort, mozodojo, rekursor, Turbo, cparm, valv & zef "
31
32credits=" andyvand, asereBLN, Azimut, bumby, cosmo1t, dfe, Galaxy, kalyway, Krazubu, MasterChief, netkas, sckevyn, smith@@, THeKiNG, blackosx, .: ErmaC :., scrax, DutchHockeyPro & Andy"
33
34# =================
35
36distributioncount=0
37xmlindent=0
38
39indent[0]="\t"
40indent[1]="\t\t"
41indent[2]="\t\t\t"
42indent[3]="\t\t\t\t"
43
44main ()
45{
46
47# clean up the destination path
48
49rm -R -f "${1}"
50echo ""
51echo -e $COL_BLACK"----------------------------------"$COL_RESET
52echo -e $COL_BLACK"Building $packagename Install Package"$COL_RESET
53echo -e $COL_BLACK"----------------------------------"$COL_RESET
54echo ""
55
56outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"
57
58# build core package
59echo "================= Core ================="
60((xmlindent++))
61packagesidentity="org.chameleon.core"
62mkdir -p ${1}/Core/Root/usr/sbin
63mkdir -p ${1}/Core/Root/usr/local/bin
64mkdir -p ${1}/Core/Root/usr/standalone/i386
65mkdir -p ${1}/Core/Root/usr/standalone/i386/modules
66cp -R ${1%/*}/i386/modules ${1}/Core/Root/usr/standalone/i386
67cp -f ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386
68cp -f ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386
69cp -f ${1%/*}/i386/boot0md ${1}/Core/Root/usr/standalone/i386
70cp -f ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386
71cp -f ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386
72cp -f ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386
73cp -f ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386
74cp -f ${1%/*}/i386/cdboot ${1}/Core/Root/usr/standalone/i386
75cp -f ${1%/*}/i386/chain0 ${1}/Core/Root/usr/standalone/i386
76fixperms "${1}/Core/Root/"
77cp -f ${1%/*}/i386/fdisk440 ${1}/Core/Root/usr/sbin
78cp -f ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin
79local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )
80echo "[BUILD] i386 "
81buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
82
83# build Chameleon package
84echo "================= Chameleon ================="
85outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Chameleon\">"
86choices[$((choicescount++))]="<choice\n\tid=\"Chameleon\"\n\ttitle=\"Chameleon_title\"\n\tdescription=\"Chameleon_description\"\n>\n</choice>\n"
87
88# build standard package
89mkdir -p ${1}/Standard/Root
90mkdir -p ${1}/Standard/Scripts/Tools
91cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts
92# ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile
93echo "[BUILD] Standard "
94buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EFI']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
95# End build standard package
96
97# build efi package
98mkdir -p ${1}/EFI/Root
99mkdir -p ${1}/EFI/Scripts/Tools
100cp -f ${pkgroot}/Scripts/EFI/* ${1}/EFI/Scripts
101# ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Tools/SetFile
102echo "[BUILD] EFI "
103buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
104# End build efi package
105
106# build reset choice package
107mkdir -p ${1}/noboot/Root
108echo "[BUILD] Reset choice "
109buildpackage "${1}/noboot" "/tmpcham" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['EFI'])\"" >/dev/null 2>&1
110# End build reset choice package
111
112# build Modules package
113echo "================= Modules ================="
114outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"
115choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"
116((xmlindent++))
117packagesidentity="org.chameleon.module"
118modules=($( find "${pkgroot}/Scripts/Modules" -type d -depth 1 -not -name '.svn' ))
119for (( i = 0 ; i < ${#modules[@]} ; i++ ))
120do
121mkdir -p "${1}/${modules[$i]##*/}/Root"
122mkdir -p "${1}/${modules[$i]##*/}/Scripts"
123ditto --noextattr --noqtn "${modules[$i]}/postinstall" "${1}/${modules[$i]##*/}/Scripts/postinstall"
124echo "[BUILD] ${modules[$i]##*/} "
125buildpackage "${1}/${modules[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
126rm -R -f "${1}/${i##*/}"
127done
128((xmlindent--))
129outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
130# End build Modules packages
131
132((xmlindent--))
133outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
134# End build Chameleon package
135
136# build Extras package
137echo "================= Extras ================="
138outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Extras\">"
139choices[$((choicescount++))]="<choice\n\tid=\"Extras\"\n\ttitle=\"Extras_title\"\n\tdescription=\"Extras_description\"\n>\n</choice>\n"
140((xmlindent++))
141packagesidentity="org.chameleon.extras.com"
142
143# build utility package
144outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Utility\">"
145choices[$((choicescount++))]="<choice\n\tid=\"Utility\"\n\ttitle=\"Utility_title\"\n\tdescription=\"Utility_description\"\n>\n</choice>\n"
146((xmlindent++))
147packagesidentity="org.chameleon.utility.com"
148
149# build package for Chameleon PrefPanel
150mkdir -p "${1}/PrefPanel/Root"
151ditto --noextattr --noqtn "${pkgroot}/Configuration/PrefPanel/Chameleon.prefPane" "${1}/PrefPanel/Root"
152echo "[BUILD] Chameleon Preference Panel "
153buildpackage "${1}/PrefPanel" "/Library/PreferencePanes/Chameleon.prefPane" "" "start_selected=\"false\"" >/dev/null 2>&1
154# End build package for Chameleon PrefPanel
155
156# build package for SMBIOSDefault
157mkdir -p "${1}/SMBIOSDefault/Root"
158ditto --noextattr --noqtn "${pkgroot}/Configuration/SMBIOSDefault/smbios.plist" "${1}/SMBIOSDefault/Root"
159echo "[BUILD] SMBIOSDefault "
160buildpackage "${1}/SMBIOSDefault" "/Extra/Example" "" "start_selected=\"false\"" >/dev/null 2>&1
161# End build package for SMBIOSDefault
162
163# build package for EFIMounter
164mkdir -p "${1}/EFIMounter/Root"
165ditto --noextattr --noqtn "${pkgroot}/Configuration/EFIMounter/EFI Mounter.app" "${1}/EFIMounter/Root"
166echo "[BUILD] EFIMounter "
167buildpackage "${1}/EFIMounter" "/Applications/EFI Mounter.app" "" "start_selected=\"false\"" >/dev/null 2>&1
168# End build package for EFIMounter
169
170# build package for Documentation
171mkdir -p "${1}/Documentation/Root"
172cp -f ${pkgroot}/doc/BootHelp.txt ${1}/Documentation/Root
173cp -f ${pkgroot}/doc/README ${1}/Documentation/Root
174cp -f ${pkgroot}/doc/Users_Guide0.5.pdf ${1}/Documentation/Root
175echo "[BUILD] Documentation "
176buildpackage "${1}/Documentation" "/Library/Documentation/Chameleon2RC5" "" "start_selected=\"false\"" >/dev/null 2>&1
177# End build package for Documentation
178
179((xmlindent--))
180outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
181# End utility package
182
183# build options packages
184echo "================= Options ================="
185outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"
186choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"
187((xmlindent++))
188
189# build base options packages
190packagesidentity="org.chameleon.options.com"
191
192options=($( find "${pkgroot}/Scripts/BaseOptions" -type d -depth 1 -not -name '.svn' ))
193for (( i = 0 ; i < ${#options[@]} ; i++ ))
194do
195mkdir -p "${1}/${options[$i]##*/}/Root"
196mkdir -p "${1}/${options[$i]##*/}/Scripts"
197ditto --noextattr --noqtn "${options[$i]}/postinstall" "${1}/${options[$i]##*/}/Scripts/postinstall"
198echo "[BUILD] ${options[$i]##*/} "
199buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
200done
201# End build base options packages
202
203# build resolution packages
204echo "================= Res. Options ================="
205outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Resolution\">"
206choices[$((choicescount++))]="<choice\n\tid=\"Resolution\"\n\ttitle=\"Resolution_title\"\n\tdescription=\"Resolution_description\"\n>\n</choice>\n"
207((xmlindent++))
208packagesidentity="org.chameleon.resolution"
209resolutions=($( find "${pkgroot}/Scripts/Resolutions" -type d -depth 1 -not -name '.svn' ))
210for (( i = 0 ; i < ${#resolutions[@]} ; i++ ))
211do
212mkdir -p "${1}/${resolutions[$i]##*/}/Root/"
213mkdir -p "${1}/${resolutions[$i]##*/}/Scripts/"
214ditto --noextattr --noqtn "${resolutions[$i]}/postinstall" "${1}/${resolutions[$i]##*/}/Scripts/postinstall"
215echo "[BUILD] ${resolutions[$i]##*/} "
216buildpackage "${1}/${resolutions[$i]##*/}" "/tmpcham" "" "start_selected=\"false\"" >/dev/null 2>&1
217done
218
219((xmlindent--))
220outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
221# End build resolution packages
222
223# build Advanced packages
224echo "================= Adv. Options ================="
225outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Advanced\">"
226choices[$((choicescount++))]="<choice\n\tid=\"Advanced\"\n\ttitle=\"Advanced_title\"\n\tdescription=\"Advanced_description\"\n>\n</choice>\n"
227((xmlindent++))
228
229packagesidentity="org.chameleon.advanced.options.pkg"
230optionsadv=($( find "${pkgroot}/Scripts/Advanced" -type d -depth 1 -not -name '.svn' ))
231for (( i = 0 ; i < ${#optionsadv[@]} ; i++ ))
232do
233mkdir -p "${1}/${optionsadv[$i]##*/}/Root"
234mkdir -p "${1}/${optionsadv[$i]##*/}/Scripts"
235ditto --noextattr --noqtn "${optionsadv[$i]}/postinstall" "${1}/${optionsadv[$i]##*/}/Scripts/postinstall"
236echo "[BUILD] ${optionsadv[$i]##*/} "
237buildpackage "${1}/${optionsadv[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
238done
239
240((xmlindent--))
241outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
242# End build Advanced packages
243
244((xmlindent--))
245outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
246
247# End build options packages
248
249# build theme packages
250echo "================= Themes ================="
251outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Themes\">"
252choices[$((choicescount++))]="<choice\n\tid=\"Themes\"\n\ttitle=\"Themes_title\"\n\tdescription=\"Themes_description\"\n>\n</choice>\n"
253((xmlindent++))
254packagesidentity="org.chameleon.theme.pkg"
255artwork="${1%/*}"
256themes=($( find "${artwork%/*}/artwork/themes" -type d -depth 1 -not -name '.svn' ))
257for (( i = 0 ; i < ${#themes[@]} ; i++ ))
258do
259theme=$( echo ${themes[$i]##*/} | awk 'BEGIN{OFS=FS=""}{$1=toupper($1);print}' )
260mkdir -p "${1}/${theme}/Root/"
261 rsync -r --exclude=.svn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}"
262 # #### Comment out thx meklort
263 # ditto --noextattr --noqtn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}"
264 # ####
265 find "${1}/${themes[$i]##*/}" -name '.DS_Store' -or -name '.svn' -exec rm -R {} \+
266find "${1}/${themes[$i]##*/}" -type f -exec chmod 644 {} \+
267echo "[BUILD] ${themes[$i]##*/} "
268buildpackage "${1}/${theme}" "/Extra/Themes" "" "start_selected=\"false\"" >/dev/null 2>&1
269rm -R -f "${1}/${i##*/}"
270done
271
272((xmlindent--))
273outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
274# End build theme packages
275
276# build kext packages
277echo "================= Kexts ================="
278outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Kexts\">"
279choices[$((choicescount++))]="<choice\n\tid=\"Kexts\"\n\ttitle=\"Kexts_title\"\n\tdescription=\"Kexts_description\"\n>\n</choice>\n"
280((xmlindent++))
281packagesidentity="org.chameleon.kext.pkg"
282kexts=($( find "${pkgroot}/Kexts" -type d -name '*.kext' -depth 1 ))
283for (( i = 0 ; i < ${#kexts[@]} ; i++ ))
284do
285filename="${kexts[$i]##*/}"
286mkdir -p "${1}/${filename%.kext}/Root"
287ditto --noextattr --noqtn --arch i386 "${kexts[$i]}" "${1}/${filename%.kext}/Root/${filename}"
288find "${1}/${filename%.kext}" -name '.DS_Store' -or -name '.svn' -exec rm -R -f {} \; 2>/dev/null
289fixperms "${1}/${filename%.kext}/Root"
290chown 501:20 "${1}/${filename%.kext}/Root"
291echo "[BUILD] ${filename%.kext} "
292buildpackage "${1}/${filename%.kext}" "/Extra/Extensions" "" "start_selected=\"false\"" >/dev/null 2>&1
293rm -R -f "${1}/${filename%.kext}"
294done
295((xmlindent--))
296outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
297# End build kext packages
298
299((xmlindent--))
300outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
301# End build Extras package
302
303# build post install package
304echo "================= Post ================="
305mkdir -p ${1}/Post/Root
306mkdir -p ${1}/Post/Scripts
307cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts
308echo "[BUILD] Post "
309buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
310outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"
311
312# build meta package
313
314makedistribution "${1}" "${2}" "${3}" "${4}" "${5}"
315
316# clean up
317
318rm -R -f "${1}"
319
320}
321
322fixperms ()
323{
324# $1 path
325find "${1}" -type f -exec chmod 644 {} \;
326find "${1}" -type d -exec chmod 755 {} \;
327chown -R 0:0 "${1}"
328}
329
330buildpackage ()
331{
332# $1 Path to package to build containing Root and or Scripts
333# $2 Install Location
334# $3 Size
335# $4 Options
336
337if [ -d "${1}/Root" ] && [ "${1}/Scripts" ]; then
338
339local packagename="${1##*/}"
340local identifier=$( echo ${packagesidentity}.${packagename//_/.} | tr [:upper:] [:lower:] )
341find "${1}" -name '.DS_Store' -delete
342local filecount=$( find "${1}/Root" | wc -l )
343if [ "${3}" ]; then
344local installedsize="${3}"
345else
346local installedsize=$( du -hkc "${1}/Root" | tail -n1 | awk {'print $1'} )
347fi
348local header="<?xml version=\"1.0\"?>\n<pkg-info format-version=\"2\" "
349
350#[ "${3}" == "relocatable" ] && header+="relocatable=\"true\" "
351
352header+="identifier=\"${identifier}\" "
353header+="version=\"${version}\" "
354
355[ "${2}" != "relocatable" ] && header+="install-location=\"${2}\" "
356
357header+="auth=\"root\">\n"
358header+="\t<payload installKBytes=\"${installedsize##* }\" numberOfFiles=\"${filecount##* }\"/>\n"
359rm -R -f "${1}/Temp"
360
361[ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp"
362[ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom"
363
364if [ -d "${1}/Scripts" ]; then
365header+="\t<scripts>\n"
366for script in $( find "${1}/Scripts" -type f \( -name 'pre*' -or -name 'post*' \) )
367do
368header+="\t\t<${script##*/} file=\"./${script##*/}\"/>\n"
369done
370header+="\t</scripts>\n"
371chown -R 0:0 "${1}/Scripts"
372pushd "${1}/Scripts" >/dev/null
373find . -print | cpio -o -z -H cpio > "../Temp/Scripts"
374popd >/dev/null
375fi
376
377header+="</pkg-info>"
378echo -e "${header}" > "${1}/Temp/PackageInfo"
379pushd "${1}/Root" >/dev/null
380find . -print | cpio -o -z -H cpio > "../Temp/Payload"
381popd >/dev/null
382pushd "${1}/Temp" >/dev/null
383
384xar -c -f "${1%/*}/${packagename// /}.pkg" --compression none .
385
386popd >/dev/null
387
388outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${packagename// /}\"/>"
389
390if [ "${4}" ]; then
391local choiceoptions="${indent[$xmlindent]}${4}\n"
392fi
393choices[$((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"
394
395rm -R -f "${1}"
396fi
397}
398
399makedistribution ()
400{
401rm -f "${1%/*}/${packagename// /}"*.pkg
402
403find "${1}" -type f -name '*.pkg' -depth 1 | while read component
404do
405mkdir -p "${1}/${packagename}/${component##*/}"
406pushd "${1}/${packagename}/${component##*/}" >/dev/null
407xar -x -f "${1%}/${component##*/}"
408popd >/dev/null
409done
410
411ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution"
412ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources"
413
414find "${1}/${packagename}/Resources" -type d -name '.svn' -exec rm -R -f {} \; 2>/dev/null
415
416for (( i=0; i < ${#outline[*]} ; i++));
417do
418echo -e "${outline[$i]}" >> "${1}/${packagename}/Distribution"
419done
420
421for (( i=0; i < ${#choices[*]} ; i++));
422do
423echo -e "${choices[$i]}" >> "${1}/${packagename}/Distribution"
424done
425
426echo "</installer-gui-script>" >> "${1}/${packagename}/Distribution"
427
428perl -i -p -e "s/%CHAMELEONVERSION%/${version%%-*}/g" `find "${1}/${packagename}/Resources" -type f`
429perl -i -p -e "s/%CHAMELEONREVISION%/${revision}/g" `find "${1}/${packagename}/Resources" -type f`
430
431# Adding Package type test (not translated)
432#perl -i -p -e "s/%PKGTYPE%/TEST/g" `find "${1}/${packagename}/Resources" -type f`
433#
434
435# Adding Developer and credits
436perl -i -p -e "s/%DEVELOP%/${develop}/g" `find "${1}/${packagename}/Resources" -type f`
437perl -i -p -e "s/%CREDITS%/${credits}/g" `find "${1}/${packagename}/Resources" -type f`
438#
439
440stage=${stage/RC/Release Candidate }
441stage=${stage/FINAL/2.0 Final}
442perl -i -p -e "s/%CHAMELEONSTAGE%/${stage}/g" `find "${1}/${packagename}/Resources" -type f`
443
444find "${1}/${packagename}" -name '.DS_Store' -delete
445pushd "${1}/${packagename}" >/dev/null
446xar -c -f "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" --compression none .
447popd >/dev/null
448
449# Here is the place for assign a Icon to the pkg
450# command use to generate the file:
451# ditto -c -k --sequesterRsrc --keepParent Icon.icns Icon.zip
452 ditto -xk "${pkgroot}/Icons/pkg.zip" "${pkgroot}/Icons/"
453 DeRez -only icns "${pkgroot}/Icons/Icons/pkg.icns" > tempicns.rsrc
454 Rez -append tempicns.rsrc -o "${1%/*}/${packagename// /}-${version}-r${revision}.pkg"
455 SetFile -a C "${1%/*}/${packagename// /}-${version}-r${revision}.pkg"
456 rm -f tempicns.rsrc
457 rm -rf "${pkgroot}/Icons/Icons"
458# End
459
460md5=$( md5 "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" | awk {'print $4'} )
461echo "MD5 (${packagename// /}-${version}-r${revision}.pkg) = ${md5}" > "${1%/*}/${packagename// /}-${version}-r${revision}.pkg.md5"
462echo ""
463
464echo -e $COL_BLACK"--------------------------"$COL_RESET
465echo -e $COL_BLACK"Building process complete!"$COL_RESET
466echo -e $COL_BLACK"--------------------------"$COL_RESET
467echo ""
468echo -e $COL_BLACK"Build info."
469echo -e $COL_BLACK"==========="
470echo -e $COL_BLUE"Package name:"$COL_BLACK"$packagename-${version}-r$revision.pkg"$COL_RESET
471echo -e $COL_BLUE"MD5:"$COL_BLACK"$md5"$COL_RESET
472echo -e $COL_BLUE"Version:"$COL_BLACK"$version"$COL_RESET
473echo -e $COL_BLUE"Stage:"$COL_BLACK"$stage"$COL_RESET
474echo -e $COL_BLUE"Date/Time:"$COL_BLACK"$builddate"$COL_RESET
475echo ""
476
477}
478
479main "${1}" "${2}" "${3}" "${4}" "${5}"
480
481

Archive Download this file

Revision: 331