␊ |
outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"␊ |
␊ |
# build pre install package␊ |
# This is run before any other package - so this could␊ |
# be a good place to initialise the install log???␊ |
␉echo "================= Preinstall ================="␊ |
␉((xmlindent++))␊ |
␉packagesidentity="org.chameleon"␊ |
␉mkdir -p ${1}/Pre/Root␊ |
␉mkdir -p ${1}/Pre/Scripts␊ |
␉cp -f ${pkgroot}/Scripts/Main/preinstall ${1}/Pre/Scripts␊ |
␉echo "␉[BUILD] Pre "␊ |
␉buildpackage "${1}/Pre" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1␊ |
# End build pre install package␊ |
␊ |
# build core package␊ |
␉echo "================= Core ================="␊ |
␉((xmlindent++))␊ |
␉packagesidentity="org.chameleon.core"␊ |
␉packagesidentity="org.chameleon"␊ |
␉mkdir -p ${1}/Core/Root/usr/local/bin␊ |
␉mkdir -p ${1}/Core/Root/usr/standalone/i386␊ |
␉ditto --noextattr --noqtn ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386␊ |
|
␉local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )␊ |
␉echo "␉[BUILD] i386 "␊ |
␉buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1␊ |
␊ |
# End build core package␊ |
␉␊ |
# build Chameleon package␊ |
␉echo "================= Chameleon ================="␊ |
␉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"␊ |
␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}<line choice=\"Chameleon\">"␊ |
␉choices[$((choicescount++))]="\t<choice\n\t\tid=\"Chameleon\"\n\t\ttitle=\"Chameleon_title\"\n\t\tdescription=\"Chameleon_description\">\n\t</choice>\n"␊ |
␉((xmlindent++))␊ |
␉␊ |
␉# build standard package ␊ |
␉␉mkdir -p ${1}/Standard/Root␊ |
␉␉mkdir -p ${1}/Standard/Scripts/Resources␊ |
|
␉# End build reset choice package ␊ |
␊ |
((xmlindent--))␊ |
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
outline[$((outlinecount++))]="${indent[$xmlindent]}</line>"␊ |
# End build Chameleon package␊ |
␊ |
# build Modules package␊ |
|
␉###############################␊ |
␉if [ "$(ls -A "${1%/*}/i386/modules")" ]; then␊ |
␉{␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"␊ |
␉␉choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}<line choice=\"Module\">"␊ |
␉␉choices[$((choicescount++))]="\t<choice\n\t\tid=\"Module\"\n\t\ttitle=\"Module_title\"\n\t\tdescription=\"Module_description\">\n\t</choice>\n"␊ |
␉␉((xmlindent++))␊ |
␉␉packagesidentity="org.chameleon.modules"␊ |
# -␊ |
|
␉␉fi␊ |
␊ |
␉␉((xmlindent--))␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}</line>"␊ |
␉}␊ |
␉else␊ |
␉{␊ |
|
␉fi␊ |
# End build Modules packages␊ |
␊ |
␊ |
# build Extras 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"␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}<line choice=\"Options\">"␊ |
␉␉choices[$((choicescount++))]="\t<choice\n\t\tid=\"Options\"\n\t\ttitle=\"Options_title\"\n\t\tdescription=\"Options_description\">\n\t</choice>\n"␊ |
␉␉((xmlindent++))␊ |
␊ |
␉␉# ------------------------------------------------------␊ |
|
␉␉␉builtOptionsList=$( echo ${OptionalSettingsFiles[$i]%.txt} )␊ |
␉␉␉builtOptionsList=$( echo ${builtOptionsList##*/} )␊ |
␉␉␉echo "================= $builtOptionsList ================="␊ |
␉␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${builtOptionsList}\">"␊ |
␉␉␉choices[$((choicescount++))]="<choice\n\tid=\"${builtOptionsList}\"\n\ttitle=\"${builtOptionsList}_title\"\n\tdescription=\"${builtOptionsList}_description\"\n>\n</choice>\n"␊ |
␉␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}<line choice=\"${builtOptionsList}\">"␊ |
␉␉␉choices[$((choicescount++))]="\t<choice\n\t\tid=\"${builtOptionsList}\"\n\t\ttitle=\"${builtOptionsList}_title\"\n\t\tdescription=\"${builtOptionsList}_description\">\n\t</choice>\n"␊ |
␉␉␉((xmlindent++))␊ |
␉␉␉packagesidentity="org.chameleon.options.$builtOptionsList"␊ |
␊ |
␉␉␉␊ |
␉␉␉# ------------------------------------------------------␊ |
␉␉␉# Read boot option file in to an array.␊ |
␉␉␉# ------------------------------------------------------ ␊ |
|
␉␉␉buildoptionalsettings "$1" "${exclusiveFlag}" "${exclusiveName}"␊ |
␉␉␉␊ |
␉␉␉((xmlindent--))␊ |
␉␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}</line>"␊ |
␉␉done␊ |
␊ |
␉␉# build KeyLayout options packages␊ |
␉␉␉echo "================= Keymaps Options ================="␊ |
␉␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"KeyLayout\">"␊ |
␉␉␉choices[$((choicescount++))]="<choice\n\tid=\"KeyLayout\"\n\ttitle=\"KeyLayout_title\"\n\tdescription=\"KeyLayout_description\"\n>\n</choice>\n"␊ |
␉␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}<line choice=\"KeyLayout\">"␊ |
␉␉␉choices[$((choicescount++))]="\t<choice\n\t\tid=\"KeyLayout\"\n\t\ttitle=\"KeyLayout_title\"\n\t\tdescription=\"KeyLayout_description\">\n\t</choice>\n"␊ |
␉␉␉((xmlindent++))␊ |
␉␉␉packagesidentity="org.chameleon.options.keylayout"␊ |
␉␉␉␊ |
|
␉␉␉buildoptionalsettings "$1" "0" "keylayout"␊ |
␉␉␉␊ |
␉␉␉((xmlindent--))␊ |
␉␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}</line>"␊ |
␊ |
␉␉# End build KeyLayout options packages␊ |
␊ |
␉␉((xmlindent--))␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}</line>"␊ |
␊ |
␉# End build options packages␊ |
␊ |
␉# build theme packages␊ |
␉␉echo "================= Themes ================="␊ |
␉␉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"␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}<line choice=\"Themes\">"␊ |
␉␉choices[$((choicescount++))]="\t<choice\n\t\tid=\"Themes\"\n\t\ttitle=\"Themes_title\"\n\t\tdescription=\"Themes_description\">\n\t</choice>\n"␊ |
␉␉((xmlindent++))␊ |
␊ |
␉␉# Using themes section from Azi's/package branch.␊ |
|
␉␉done␊ |
␊ |
␉␉((xmlindent--))␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"␊ |
␉␉outline[$((outlinecount++))]="${indent[$xmlindent]}</line>"␊ |
␉# End build theme packages␊ |
# End build Extras package␊ |
␊ |
# build post install package␊ |
␉echo "================= Post ================="␊ |
␉packagesidentity="org.chameleon"␊ |
␉mkdir -p ${1}/Post/Root␊ |
␉mkdir -p ${1}/Post/Scripts␊ |
␉cp -f ${pkgroot}/Scripts/Main/Post/* ${1}/Post/Scripts␊ |
|
␉ditto --noextattr --noqtn ${1%/*/*}/version ${1}/Post/Scripts/Resources/version␊ |
␉echo "␉[BUILD] Post "␊ |
␉buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"␊ |
# End build post install package␊ |
␊ |
((xmlindent--))␊ |
outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"␊ |
␊ |
# build meta package␊ |
␊ |
␉makedistribution "${1}" "${2}" "${3}" "${4}" "${5}"␊ |
␉makedistribution "${1}" "${2}" "${3}" "${4}" #"${5}"␊ |
␊ |
# clean up ␊ |
␊ |
|
␊ |
␉popd >/dev/null␊ |
␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${packagename// /}\"/>"␊ |
␉outline[$((outlinecount++))]="${indent[$xmlindent]}<line choice=\"${packagename// /}\"/>"␊ |
␊ |
␉if [ "${4}" ]; then␊ |
␉␉local choiceoptions="${indent[$xmlindent]}${4}\n"␉␊ |
␉␉local choiceoptions="\t\t${4}"␊ |
␉fi␊ |
␉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"␊ |
␊ |
␉#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"␊ |
␉␊ |
␉choices[$((choicescount++))]="\t<choice\n\t\tid=\"${packagename// /}\"\n\t\ttitle=\"${packagename}_title\"\n\t\tdescription=\"${packagename}_description\"\n${choiceoptions}>\n\t\t<pkg-ref id=\"${identifier}\" installKBytes='${installedsize}' version='${version}.0.0.${timestamp}' >#${packagename// /}.pkg</pkg-ref>\n\t</choice>\n"␉␊ |
␉rm -R -f "${1}"␊ |
fi␊ |
}␊ |