Index: branches/blackosx/package/Scripts/Main/postinstall =================================================================== --- branches/blackosx/package/Scripts/Main/postinstall (revision 1659) +++ branches/blackosx/package/Scripts/Main/postinstall (revision 1660) @@ -3,8 +3,6 @@ echo "===============================================" echo "Post Post-Install Script" echo "*********************************" -echo "-----------------------------------------------" -echo "" #echo "DEBUG: $ 1 = Full path to the installation package the installer app is processing: " $1 #echo "DEBUG: $ 2 = Full path to the installation destination: " $2 @@ -41,6 +39,7 @@ # Check for stopped installation due to Chameleon # already existing on the same disk. +# TO DO - This check can be removed as it's no longer used!! if [ ! -f "$dest_vol"/.ChameleonExists ]; then # --------------------------------------------- @@ -80,31 +79,7 @@ fi tempOCBP="$chamTemp"/Extra/org.chameleon.Boot.plist - - # # Does the user want to upgrade an existing /Extra folder? - # # If so, then make a copy of their Boot.plist. - # if [ -e "$chamTemp/install_type_upgrade" ]; then - # # Check for an existing /Extra folder - # if [ -e "$dest_vol"/.ChameleonEFI ]; then - # if [ -e "/Volumes/EFI/Extra/org.chameleon.Boot.plist" ]; then - # cp /Volumes/EFI/Extra/org.chameleon.Boot.plist "$tempOCBP" - # fi - # if [ -e "/Volumes/EFI/Extra/com.apple.Boot.plist" ]; then - # cp /Volumes/EFI/Extra/com.apple.Boot.plist "$tempOCBP" - # fi - # else - # if [ -e "$dest_vol/Extra/org.chameleon.Boot.plist" ]; then - # cp "${dest_vol}/Extra/org.chameleon.Boot.plist" "$tempOCBP" - # fi - # if [ -e "$dest_vol/Extra/com.apple.Boot.plist" ]; then - # cp "${dest_vol}/Extra/com.apple.Boot.plist" "$tempOCBP" - # fi - # fi - # elif [ -e "$chamTemp/install_type_new" ]; then - # # Create template for org.chameleon.Boot.plist" - # cp "$4"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist "$tempOCBP" - # fi - + # Create template for org.chameleon.Boot.plist" tempOCBP="$chamTemp"/Extra/org.chameleon.Boot.plist cp "$4"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist "$tempOCBP" @@ -169,8 +144,41 @@ fi fi fi - + # --------------------------------------------- + # Merge /Extra folders? + # --------------------------------------------- + # Does the user want to upgrade an existing /Extra folder? + # If so, then merge their existing one in to the temp one + if [ -e "$chamTemp/install_type_upgrade" ]; then + # first move the new org.chameleon.Boot.plist out of tmp + # Extra folder so we can merge that separately. + mv "$tempOCBP" "$chamTemp/holding.plist" + + # Check for an existing /Extra folder + # and merge existing /Extra with temp one. + if [ -e "$dest_vol"/.ChameleonEFI ]; then + if [ -e "/Volumes/EFI/Extra" ]; then + ditto --noextattr --noqtn /Volumes/EFI/Extra "$chamTemp"/Extra + fi + else + if [ -e "$dest_vol/Extra" ]; then + ditto --noextattr --noqtn "${dest_vol}"/Extra "$chamTemp"/Extra + fi + fi + + # Check existing plist name for old naming convention + # and change to new convention. + if [ -e "$chamTemp"/Extra/com.apple.Boot.plist ]; then + mv "$chamTemp"/Extra/com.apple.Boot.plist "$tempOCBP" + fi + + # Merge new org.chameleon.Boot.plist (holding.plist) + # with their currently existing one. + sudo /usr/libexec/plistbuddy -c "Merge $chamTemp/holding.plist" "$tempOCBP" + fi + + # --------------------------------------------- # Copy temp Extra folder to target destination # --------------------------------------------- # If we've made a temporary Extra folder to use then Index: branches/blackosx/package/Scripts/Sub/InstallLog.sh =================================================================== --- branches/blackosx/package/Scripts/Sub/InstallLog.sh (revision 1659) +++ branches/blackosx/package/Scripts/Sub/InstallLog.sh (revision 1660) @@ -1,8 +1,8 @@ #!/bin/bash -echo "===============================================" -echo "InstallLog: Create/Append installation log" -echo "**********************************************" +#echo "===============================================" +#echo "InstallLog: Create/Append installation log" +#echo "**********************************************" # Writes to the Chameleon_Installer_Log.txt file created # by the preinstall script at the start of installation. @@ -14,10 +14,10 @@ if [ "$#" -eq 2 ]; then logLocation="$1" verboseText="$2" - echo "DEBUG: passed argument = ${logLocation}" - echo "DEBUG: passed argument = ${verboseText}" + #echo "DEBUG: passed argument = ${logLocation}" + #echo "DEBUG: passed argument = ${verboseText}" else - echo "Error - wrong number of values passed" + echo "InstallLog: Error - wrong number of values passed" exit 9 fi Index: branches/blackosx/package/buildpkg.sh =================================================================== --- branches/blackosx/package/buildpkg.sh (revision 1659) +++ branches/blackosx/package/buildpkg.sh (revision 1660) @@ -89,28 +89,28 @@ # End build core package # build install type -# echo "================= Chameleon =================" -# outline[$((outlinecount++))]="${indent[$xmlindent]}" -# choices[$((choicescount++))]="\t\n\t\n" -# ((xmlindent++)) -# packagesidentity="org.chameleon.type" -# -# # build new install package -# mkdir -p ${1}/New/Root -# echo "" > "${1}/New/Root/install_type_new" -# echo " [BUILD] New " -# buildpackage "${1}/New" "/$chamTemp" "" "start_enabled=\"true\" selected=\"exclusive(choices['Upgrade'])\"" >/dev/null 2>&1 -# # End build new install package -# -# # build upgrade package -# mkdir -p ${1}/Upgrade/Root -# echo "" > "${1}/Upgrade/Root/install_type_upgrade" -# echo " [BUILD] Upgrade " -# buildpackage "${1}/Upgrade" "/$chamTemp" "" "start_selected=\"false\" selected=\"exclusive(choices['New'])\"" >/dev/null 2>&1 -# # End build upgrade package + echo "================= Chameleon =================" + outline[$((outlinecount++))]="${indent[$xmlindent]}" + choices[$((choicescount++))]="\t\n\t\n" + ((xmlindent++)) + packagesidentity="org.chameleon.type" + + # build new install package + mkdir -p ${1}/New/Root + echo "" > "${1}/New/Root/install_type_new" + echo " [BUILD] New " + buildpackage "${1}/New" "/$chamTemp" "" "start_enabled=\"true\" selected=\"exclusive(choices['Upgrade'])\"" >/dev/null 2>&1 + # End build new install package -# ((xmlindent--)) -# outline[$((outlinecount++))]="${indent[$xmlindent]}" + # build upgrade package + mkdir -p ${1}/Upgrade/Root + echo "" > "${1}/Upgrade/Root/install_type_upgrade" + echo " [BUILD] Upgrade " + buildpackage "${1}/Upgrade" "/$chamTemp" "" "start_selected=\"false\" selected=\"exclusive(choices['New'])\"" >/dev/null 2>&1 + # End build upgrade package + + ((xmlindent--)) + outline[$((outlinecount++))]="${indent[$xmlindent]}" # End build install type # build Chameleon package