␊ |
# clean up the destination path␊ |
␊ |
␉rm -R -f "${1}"␊ |
rm -R -f "${1}"␊ |
␉␊ |
␉echo "Building $packagename Install Package v${version%%-*} $stage r$revision $builddate"␊ |
␉␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"␊ |
echo "Building $packagename Install Package v${version%%-*} $stage r$revision $builddate"␊ |
␊ |
outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"␊ |
␊ |
# build core package␊ |
␊ |
␉((xmlindent++))␊ |
|
␉cp -f ${pkgroot}/fdisk440 ${1}/Core/Root/usr/sbin␊ |
␉cp -f ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin␊ |
␉local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )␊ |
␉echo "Building core package"␊ |
␉buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\""␊ |
#␉buildpackage "${1}/Core" "/" "0" "start_visible=\"true\" start_selected=\"true\""␊ |
␊ |
␊ |
# build Chameleon package␊ |
␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Chameleon\">"␊ |
␉choices[$((choicescount++))]="<choice\n\tid=\"Chameleon\"\n\ttitle=\"Chameleon_title\"\n\tdescription=\"Chameleon_description\"\n>\n</choice>\n"␊ |
␊ |
# build standard package ␊ |
␉# build standard package ␊ |
␉␉mkdir -p ${1}/Standard/Root␊ |
␉␉mkdir -p ${1}/Standard/Scripts/Tools␊ |
␉␉cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts␊ |
␉␉ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile␊ |
␉␉echo "Building boot0 package"␊ |
␉␉buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EnhancedHFS']) && exclusive(choices['Standardhfs']) && exclusive(choices['EnhancedFAT']) && exclusive(choices['noboot'])\""␊ |
␉# End build standard package ␊ |
␊ |
␉mkdir -p ${1}/Standard/Root␊ |
␉mkdir -p ${1}/Standard/Scripts/Tools␊ |
␉cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts␊ |
␉ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile␊ |
␉buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EnhancedHFS']) && exclusive(choices['Standardhfs']) && exclusive(choices['EnhancedFAT'])\""␊ |
␉# build standard package with boot0hfs␊ |
␉␉mkdir -p ${1}/Standardhfs/Root␊ |
␉␉mkdir -p ${1}/Standardhfs/Scripts/Tools␊ |
␉␉cp -f ${pkgroot}/Scripts/Standardhfs/* ${1}/Standardhfs/Scripts␊ |
␉␉ditto --arch i386 `which SetFile` ${1}/Standardhfs/Scripts/Tools/SetFile␊ |
␉␉echo "Building boot0hfs package"␊ |
␉␉buildpackage "${1}/Standardhfs" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"false\" selected=\"exclusive(choices['EnhancedHFS']) && exclusive(choices['Standard']) && exclusive(choices['EnhancedFAT']) && exclusive(choices['noboot'])\""␊ |
␉# End build standard package with boot0hfs␊ |
␊ |
# build standard package with boot0hfs␊ |
␉# build efi fat32 package ␊ |
␉␉mkdir -p ${1}/EnhancedFAT/Root␊ |
␉␉mkdir -p ${1}/EnhancedFAT/Scripts/Tools␊ |
␉␉cp -f ${pkgroot}/Scripts/FAT/* ${1}/EnhancedFAT/Scripts␊ |
␉␉ditto --arch i386 `which SetFile` ${1}/EnhancedFAT/Scripts/Tools/SetFile␊ |
␉␉echo "Building efi fat32 package"␊ |
␉␉buildpackage "${1}/EnhancedFAT" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['Standardhfs']) && exclusive(choices['EnhancedHFS']) && exclusive(choices['noboot'])\""␊ |
␉# End build efi fat32 package ␊ |
␊ |
␉mkdir -p ${1}/Standardhfs/Root␊ |
␉mkdir -p ${1}/Standardhfs/Scripts/Tools␊ |
␉cp -f ${pkgroot}/Scripts/Standardhfs/* ${1}/Standardhfs/Scripts␊ |
␉ditto --arch i386 `which SetFile` ${1}/Standardhfs/Scripts/Tools/SetFile␊ |
␉buildpackage "${1}/Standardhfs" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"false\" selected=\"exclusive(choices['EnhancedHFS']) && exclusive(choices['Standard']) && exclusive(choices['EnhancedFAT'])\""␊ |
␉# build efi hfs package ␊ |
␉␉mkdir -p ${1}/EnhancedHFS/Root␊ |
␉␉mkdir -p ${1}/EnhancedHFS/Scripts/Tools␊ |
␉␉cp -f ${pkgroot}/Scripts/HFS/* ${1}/EnhancedHFS/Scripts␊ |
␉␉ditto --arch i386 `which SetFile` ${1}/EnhancedHFS/Scripts/Tools/SetFile␊ |
␉␉echo "Building efi hfs package"␊ |
␉␉buildpackage "${1}/EnhancedHFS" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['Standardhfs']) && exclusive(choices['EnhancedFAT']) && exclusive(choices['noboot'])\""␊ |
␉# End build efi hfs package ␊ |
␉␊ |
␉# build reset choice package ␊ |
␉␉mkdir -p ${1}/noboot/Root␊ |
␉␉echo "Building reset choice package"␊ |
␉␉buildpackage "${1}/noboot" "/binaries" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['Standardhfs']) && exclusive(choices['EnhancedFAT']) && exclusive(choices['EnhancedHFS'])\""␊ |
␉# End build reset choice package ␊ |
␊ |
␊ |
# build efi fat32 package ␊ |
␊ |
␉mkdir -p ${1}/EnhancedFAT/Root␊ |
␉mkdir -p ${1}/EnhancedFAT/Scripts/Tools␊ |
␉cp -f ${pkgroot}/Scripts/FAT/* ${1}/EnhancedFAT/Scripts␊ |
␉ditto --arch i386 `which SetFile` ${1}/EnhancedFAT/Scripts/Tools/SetFile␊ |
␉buildpackage "${1}/EnhancedFAT" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['Standardhfs']) && exclusive(choices['EnhancedHFS'])\""␊ |
␊ |
# build efi hfs package ␊ |
␊ |
␉mkdir -p ${1}/EnhancedHFS/Root␊ |
␉mkdir -p ${1}/EnhancedHFS/Scripts/Tools␊ |
␉cp -f ${pkgroot}/Scripts/HFS/* ${1}/EnhancedHFS/Scripts␊ |
␉ditto --arch i386 `which SetFile` ${1}/EnhancedHFS/Scripts/Tools/SetFile␊ |
␉buildpackage "${1}/EnhancedHFS" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['Standardhfs']) && exclusive(choices['EnhancedFAT'])\""␊ |
␊ |
␉((xmlindent--))␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
# End build Chameleon package␊ |
␊ |
␊ |
# build PrefPanel package ␊ |
␊ |
#␉mkdir -p ${1}/PrefPanel/Root␊ |
#␉mkdir -p ${1}/PrefPanel/Root/Library/PreferencePanes␊ |
#␉cp -Rf ${pkgroot}/Configuration/Chameleon.prefPane ${1}/PrefPanel/Root/Library/PreferencePanes␊ |
#␉buildpackage "${1}/PrefPanel" "/" "${coresize}" "start_visible=\"true\" start_selected=\"false\""␊ |
␊ |
# build utility package␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Utility\">"␊ |
␉choices[$((choicescount++))]="<choice\n\tid=\"Utility\"\n\ttitle=\"Utility_title\"\n\tdescription=\"Utility_description\"\n>\n</choice>\n"␊ |
# build Extras package␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Extras\">"␊ |
␉choices[$((choicescount++))]="<choice\n\tid=\"Extras\"\n\ttitle=\"Extras_title\"\n\tdescription=\"Extras_description\"\n>\n</choice>\n"␊ |
␉((xmlindent++))␊ |
␉packagesidentity="org.chameleon"␊ |
␊ |
␉# build package for bdmesg␊ |
#␉␉mkdir -p "${1}/bdmesg/Root"␊ |
#␉␉ditto --noextattr --noqtn "${1%/*}/i386/bdmesg" "${1}/bdmesg/Root"␊ |
#␉␉echo "Building bdmesg package"␊ |
#␉␉buildpackage "${1}/bdmesg" "/usr/sbin" "" "start_selected=\"false\""␊ |
␉# End build package for bdmesg␊ |
␉# build utility package␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Utility\">"␊ |
␉␉choices[$((choicescount++))]="<choice\n\tid=\"Utility\"\n\ttitle=\"Utility_title\"\n\tdescription=\"Utility_description\"\n>\n</choice>\n"␊ |
␉␉((xmlindent++))␊ |
␉␉packagesidentity="org.chameleon"␊ |
␊ |
␉# build package for Chameleon PrefPanel␊ |
␉␉mkdir -p "${1}/PrefPanel/Root/"␊ |
␉␉ditto --noextattr --noqtn "${pkgroot}/Configuration/PrefPanel/Chameleon.prefPane" "${1}/PrefPanel/Root"␊ |
␉␉echo "Building Chameleon Preference Panel package"␊ |
␉␉buildpackage "${1}/PrefPanel" "/Library/PreferencePanes/Chameleon.prefPane" "" "start_selected=\"false\""␊ |
␉# End build package for Chameleon PrefPanel␊ |
␉␉# build package for Chameleon PrefPanel␊ |
␉␉␉mkdir -p "${1}/PrefPanel/Root/"␊ |
␉␉␉ditto --noextattr --noqtn "${pkgroot}/Configuration/PrefPanel/Chameleon.prefPane" "${1}/PrefPanel/Root"␊ |
␉␉␉echo "Building Chameleon Preference Panel package"␊ |
␉␉␉buildpackage "${1}/PrefPanel" "/Library/PreferencePanes/Chameleon.prefPane" "" "start_selected=\"false\""␊ |
␉␉# End build package for Chameleon PrefPanel␊ |
␉␉␊ |
␉# build package for SMBIOSDefault␊ |
␉␉mkdir -p "${1}/SMBIOSDefault/Root/"␊ |
␉␉ditto --noextattr --noqtn "${pkgroot}/Configuration/SMBIOSDefault/smbios.plist" "${1}/SMBIOSDefault/Root"␊ |
␉␉echo "Building SMBIOSDefault package"␊ |
␉␉buildpackage "${1}/SMBIOSDefault" "/Extra/Example" "" "start_selected=\"false\""␊ |
␉# End build package for SMBIOSDefault␊ |
␉␉# build package for SMBIOSDefault␊ |
␉␉␉mkdir -p "${1}/SMBIOSDefault/Root/"␊ |
␉␉␉ditto --noextattr --noqtn "${pkgroot}/Configuration/SMBIOSDefault/smbios.plist" "${1}/SMBIOSDefault/Root"␊ |
␉␉␉echo "Building SMBIOSDefault package"␊ |
␉␉␉buildpackage "${1}/SMBIOSDefault" "/Extra/Example" "" "start_selected=\"false\""␊ |
␉␉# End build package for SMBIOSDefault␊ |
␉␉␊ |
␉# build package for EFIMounter␊ |
␉␉mkdir -p "${1}/EFIMounter/Root/"␊ |
␉␉ditto --noextattr --noqtn "${pkgroot}/Configuration/EFIMounter/EFI Mounter.app" "${1}/EFIMounter/Root"␊ |
␉␉echo "Building EFIMounter package"␊ |
␉␉buildpackage "${1}/EFIMounter" "/Applications/EFI Mounter.app" "" "start_selected=\"false\""␊ |
␉# End build package for EFIMounter␊ |
␉␉# build package for EFIMounter␊ |
␉␉␉mkdir -p "${1}/EFIMounter/Root/"␊ |
␉␉␉ditto --noextattr --noqtn "${pkgroot}/Configuration/EFIMounter/EFI Mounter.app" "${1}/EFIMounter/Root"␊ |
␉␉␉echo "Building EFIMounter package"␊ |
␉␉␉buildpackage "${1}/EFIMounter" "/Applications/EFI Mounter.app" "" "start_selected=\"false\""␊ |
␉␉# End build package for EFIMounter␊ |
␉␉␊ |
␉((xmlindent--))␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
# End utility package␊ |
␉␉# build package for Documentation␊ |
␉␉␉mkdir -p "${1}/Documentation/Root"␊ |
␉␉␉cp -f ${pkgroot}/doc/BootHelp.txt ${1}/Documentation/Root␊ |
␉␉␉cp -f ${pkgroot}/doc/README ${1}/Documentation/Root␊ |
␉␉␉cp -f ${pkgroot}/doc/Users_Guide0.5.pdf ${1}/Documentation/Root␊ |
␉␉␉echo "Building Documentation package"␊ |
␉␉␉buildpackage "${1}/Documentation" "/Documentation/Chameleon2RC5" "" "start_selected=\"false\""␊ |
␉␉# End build package for Documentation␊ |
␊ |
# build Documentation package␊ |
#␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Documentation\">"␊ |
#␉choices[$((choicescount++))]="<choice\n\tid=\"Documentation\"\n\ttitle=\"Documentation_title\"\n\tdescription=\"Documentation_description\"\n>\n</choice>\n"␊ |
#␉((xmlindent++))␊ |
#␉packagesidentity="org.chameleon"␊ |
␊ |
␉# build package for Documentation␊ |
#␉␉mkdir -p "${1}/Documentation/Root"␊ |
#␉␉cp -f ${pkgroot}/doc/BootHelp.txt ${1}/Documentation/Root␊ |
#␉␉cp -f ${pkgroot}/doc/README ${1}/Documentation/Root␊ |
#␉␉cp -f ${pkgroot}/doc/Users_Guide0.5.pdf ${1}/Documentation/Root␊ |
#␉␉echo "Building Documentation package"␊ |
#␉␉buildpackage "${1}/Documentation" "/Documentation/Chameleon2RC5" "" "start_selected=\"false\""␊ |
␉# End build package for bdmesg␊ |
␉␉((xmlindent--))␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉# End utility package␊ |
␉␉␊ |
#␉((xmlindent--))␊ |
#␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
# End utility package␊ |
␉# build options packages␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"␊ |
␉␉choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"␊ |
␉␉((xmlindent++))␊ |
␉␉packagesidentity="org.chameleon"␊ |
␉␉␊ |
␉␉options=($( find "${pkgroot}/Scripts/Options" -type d -depth 1 -not -name '.svn' ))␊ |
␉␉for (( i = 0 ; i < ${#options[@]} ; i++ )) ␊ |
␉␉do␊ |
␉␉␉mkdir -p "${1}/${options[$i]##*/}/Root"␊ |
␉␉␉mkdir -p "${1}/${options[$i]##*/}/Scripts"␊ |
␉␉␉ditto --noextattr --noqtn "${options[$i]}/postinstall" "${1}/${options[$i]##*/}/Scripts/postinstall"␊ |
␉␉␉echo "Building ${options[$i]##*/} package"␊ |
␉␉␉buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\""␊ |
␉␉done␊ |
␉␊ |
␉␉# build Advanced packages␊ |
␉␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Advanced\">"␊ |
␉␉␉choices[$((choicescount++))]="<choice\n\tid=\"Advanced\"\n\ttitle=\"Advanced_title\"\n\tdescription=\"Advanced_description\"\n>\n</choice>\n"␊ |
␉␉␉((xmlindent++))␊ |
␊ |
# build options packages␊ |
␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"␊ |
␉choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"␊ |
␉((xmlindent++))␊ |
␉packagesidentity="org.chameleon"␊ |
␉options=($( find "${pkgroot}/Scripts/Options" -type d -depth 1 -not -name '.svn' ))␊ |
␉for (( i = 0 ; i < ${#options[@]} ; i++ )) ␊ |
␉do␊ |
␉␉mkdir -p "${1}/${options[$i]##*/}/Root"␊ |
␉␉mkdir -p "${1}/${options[$i]##*/}/Scripts"␊ |
␉␉␉packagesidentity="org.chameleon"␊ |
␉␉␉optionsadv=($( find "${pkgroot}/Scripts/Advanced" -type d -depth 1 -not -name '.svn' ))␊ |
␉␉␉for (( i = 0 ; i < ${#optionsadv[@]} ; i++ )) ␊ |
␉␉␉do␊ |
␉␉␉␉mkdir -p "${1}/${optionsadv[$i]##*/}/Root"␊ |
␉␉␉␉mkdir -p "${1}/${optionsadv[$i]##*/}/Scripts"␊ |
␉␉␉␉ditto --noextattr --noqtn "${optionsadv[$i]}/postinstall" "${1}/${optionsadv[$i]##*/}/Scripts/postinstall"␊ |
␉␉␉␉echo "Building ${optionsadv[$i]##*/} package"␊ |
␉␉␉␉buildpackage "${1}/${optionsadv[$i]##*/}" "/" "" "start_selected=\"false\""␊ |
␉␉␉done␊ |
␉␉␊ |
␉␉ditto --noextattr --noqtn "${options[$i]}/postinstall" "${1}/${options[$i]##*/}/Scripts/postinstall"␊ |
␉␉␉((xmlindent--))␊ |
␉␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉␉# End build Advanced packages␊ |
␉␉␊ |
␉␉buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\""␊ |
␉done␊ |
␉␉((xmlindent--))␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉# End build options packages␊ |
␉␊ |
␉((xmlindent--))␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉# build resolution packages␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Resolution\">"␊ |
␉␉choices[$((choicescount++))]="<choice\n\tid=\"Resolution\"\n\ttitle=\"Resolution_title\"\n\tdescription=\"Resolution_description\"\n>\n</choice>\n"␊ |
␉␉((xmlindent++))␊ |
␉␉packagesidentity="org.chameleon.resolution"␊ |
␉␉resolutions=($( find "${pkgroot}/Scripts/Resolutions" -type d -depth 1 -not -name '.svn' ))␊ |
␉␉for (( i = 0 ; i < ${#resolutions[@]} ; i++ )) ␊ |
␉␉do␊ |
␉␉␉mkdir -p "${1}/${resolutions[$i]##*/}/Root/"␊ |
␉␉␉mkdir -p "${1}/${resolutions[$i]##*/}/Scripts/"␊ |
␉␉␉ditto --noextattr --noqtn "${resolutions[$i]}/postinstall" "${1}/${resolutions[$i]##*/}/Scripts/postinstall"␊ |
␉␉␉echo "Building ${resolutions[$i]##*/} package"␊ |
␉␉␉buildpackage "${1}/${resolutions[$i]##*/}" "/" "" "start_selected=\"false\""␊ |
␉␉done␊ |
␊ |
# build resolution packages␊ |
␉␉((xmlindent--))␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉# End build resolution packages␊ |
␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Resolution\">"␊ |
␉choices[$((choicescount++))]="<choice\n\tid=\"Resolution\"\n\ttitle=\"Resolution_title\"\n\tdescription=\"Resolution_description\"\n>\n</choice>\n"␊ |
␉((xmlindent++))␊ |
␉packagesidentity="org.chameleon.resolution"␊ |
␉resolutions=($( find "${pkgroot}/Scripts/Resolutions" -type d -depth 1 -not -name '.svn' ))␊ |
␉for (( i = 0 ; i < ${#resolutions[@]} ; i++ )) ␊ |
␉do␊ |
␉␉mkdir -p "${1}/${resolutions[$i]##*/}/Root/"␊ |
␉␉mkdir -p "${1}/${resolutions[$i]##*/}/Scripts/"␊ |
␉␉ditto --noextattr --noqtn "${resolutions[$i]}/postinstall" "${1}/${resolutions[$i]##*/}/Scripts/postinstall"␊ |
␉# build theme packages␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Themes\">"␊ |
␉␉choices[$((choicescount++))]="<choice\n\tid=\"Themes\"\n\ttitle=\"Themes_title\"\n\tdescription=\"Themes_description\"\n>\n</choice>\n"␊ |
␉␉((xmlindent++))␊ |
␉␉packagesidentity="org.chameleon.theme"␊ |
␉␉artwork="${1%/*}"␊ |
␉␉themes=($( find "${artwork%/*}/artwork/themes" -type d -depth 1 -not -name '.svn' ))␊ |
␉␉for (( i = 0 ; i < ${#themes[@]} ; i++ )) ␊ |
␉␉do␊ |
␉␉␉theme=$( echo ${themes[$i]##*/} | awk 'BEGIN{OFS=FS=""}{$1=toupper($1);print}' )␊ |
␉␉␉mkdir -p "${1}/${theme}/Root/"␊ |
␉␉␉ditto --noextattr --noqtn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}"␊ |
␉␉␉find "${1}/${themes[$i]##*/}" -name '.DS_Store' -or -name '.svn' -exec rm -R {} \+␊ |
␉␉␉find "${1}/${themes[$i]##*/}" -type f -exec chmod 644 {} \+␊ |
␉␉␉echo "Building ${themes[$i]##*/} package"␊ |
␉␉␉buildpackage "${1}/${theme}" "/.Chameleon/Extra/Themes" "" "start_selected=\"false\""␊ |
␉␉␉rm -R -f "${1}/${i##*/}"␊ |
␉␉done␊ |
␊ |
␉␉buildpackage "${1}/${resolutions[$i]##*/}" "/" "" "start_selected=\"false\""␊ |
␉done␊ |
␉␉((xmlindent--))␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉# End build theme packages␊ |
␊ |
␉((xmlindent--))␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉# build kext packages ␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Kexts\">"␊ |
␉␉choices[$((choicescount++))]="<choice\n\tid=\"Kexts\"\n\ttitle=\"Kexts_title\"\n\tdescription=\"Kexts_description\"\n>\n</choice>\n"␊ |
␉␉((xmlindent++))␊ |
␉␉packagesidentity="org.chameleon"␊ |
␉␉kexts=($( find "${pkgroot}/Kexts" -type d -name '*.kext' -depth 1 ))␊ |
␉␉for (( i = 0 ; i < ${#kexts[@]} ; i++ )) ␊ |
␉␉do␊ |
␉␉␉filename="${kexts[$i]##*/}"␊ |
␉␉␉mkdir -p "${1}/${filename%.kext}/Root/"␊ |
␉␉␉ditto --noextattr --noqtn --arch i386 "${kexts[$i]}" "${1}/${filename%.kext}/Root/${filename}"␊ |
␉␉␉find "${1}/${filename%.kext}" -name '.DS_Store' -or -name '.svn' -exec rm -R -f {} \; 2>/dev/null␊ |
␉␉␉fixperms "${1}/${filename%.kext}/Root/"␊ |
␉␉␉chown 501:20 "${1}/${filename%.kext}/Root/"␊ |
␉␉␉echo "Building ${filename%.kext} package"␊ |
␉␉␉buildpackage "${1}/${filename%.kext}" "/.Chameleon/Extra/Extensions" "" "start_selected=\"false\""␊ |
␉␉␉rm -R -f "${1}/${filename%.kext}"␊ |
␉␉done␊ |
␉␉((xmlindent--))␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉# End build kext packages ␊ |
␊ |
# build theme packages␊ |
␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Themes\">"␊ |
␉choices[$((choicescount++))]="<choice\n\tid=\"Themes\"\n\ttitle=\"Themes_title\"\n\tdescription=\"Themes_description\"\n>\n</choice>\n"␊ |
␉((xmlindent++))␊ |
␉packagesidentity="org.chameleon.theme"␊ |
␉artwork="${1%/*}"␊ |
␉themes=($( find "${artwork%/*}/artwork/themes" -type d -depth 1 -not -name '.svn' ))␊ |
␉for (( i = 0 ; i < ${#themes[@]} ; i++ )) ␊ |
␉do␊ |
␉␉theme=$( echo ${themes[$i]##*/} | awk 'BEGIN{OFS=FS=""}{$1=toupper($1);print}' )␊ |
␉␉mkdir -p "${1}/${theme}/Root/"␊ |
␉␉ditto --noextattr --noqtn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}"␊ |
␉␉find "${1}/${themes[$i]##*/}" -name '.DS_Store' -or -name '.svn' -exec rm -R {} \+␊ |
␉␉find "${1}/${themes[$i]##*/}" -type f -exec chmod 644 {} \+␊ |
␊ |
␉␉buildpackage "${1}/${theme}" "/.Chameleon/Extra/Themes" "" "start_selected=\"false\""␊ |
␉␉rm -R -f "${1}/${i##*/}"␊ |
␉done␊ |
␊ |
␉((xmlindent--))␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
# End build Extras package␊ |
␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Extras\">"␊ |
␉choices[$((choicescount++))]="<choice\n\tid=\"Extras\"\n\ttitle=\"Extras_title\"\n\tdescription=\"Extras_description\"\n>\n</choice>\n"␊ |
␊ |
␉((xmlindent++))␊ |
␊ |
# build kext packages ␊ |
␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Kexts\">"␊ |
␉choices[$((choicescount++))]="<choice\n\tid=\"Kexts\"\n\ttitle=\"Kexts_title\"\n\tdescription=\"Kexts_description\"\n>\n</choice>\n"␊ |
␉((xmlindent++))␊ |
␉packagesidentity="org.chameleon"␊ |
␉kexts=($( find "${pkgroot}/Kexts" -type d -name '*.kext' -depth 1 ))␊ |
␉for (( i = 0 ; i < ${#kexts[@]} ; i++ )) ␊ |
␉do␊ |
␉␉filename="${kexts[$i]##*/}"␊ |
␉␉mkdir -p "${1}/${filename%.kext}/Root/"␊ |
␉␉ditto --noextattr --noqtn --arch i386 "${kexts[$i]}" "${1}/${filename%.kext}/Root/${filename}"␊ |
␉␉find "${1}/${filename%.kext}" -name '.DS_Store' -or -name '.svn' -exec rm -R -f {} \; 2>/dev/null␊ |
␉␉fixperms "${1}/${filename%.kext}/Root/"␊ |
␉␉chown 501:20 "${1}/${filename%.kext}/Root/"␊ |
␉␉buildpackage "${1}/${filename%.kext}" "/.Chameleon/Extra/Extensions" "" "start_selected=\"false\""␊ |
␉␉rm -R -f "${1}/${filename%.kext}"␊ |
␉done␊ |
␊ |
␉((xmlindent--))␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␊ |
␉((xmlindent--))␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␊ |
# build post install package ␊ |
␊ |
␉mkdir -p ${1}/Post/Root␊ |
␉mkdir -p ${1}/Post/Scripts␊ |
␉cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts␊ |
␉buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\""␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"␊ |
␊ |
# build meta package␊ |
␊ |
␉makedistribution "${1}" "${2}" "${3}" "${4}" "${5}"␊ |
␊ |
# clean up ␊ |
␊ |
␉rm -R -f "${1}"␊ |
␊ |
}␊ |