Index: trunk/package/Scripts.templates/Pre/preinstall =================================================================== --- trunk/package/Scripts.templates/Pre/preinstall (revision 1787) +++ trunk/package/Scripts.templates/Pre/preinstall (revision 1788) @@ -61,18 +61,21 @@ # --------------------------------------------- # Backing up Chameleon files # --------------------------------------------- -# Backup stage2 -if [[ -f "${targetVolume}/boot" ]];then - echo "Backing up stage2 file ${targetVolume}/boot to ${backupDir}/boot" >>"${logFile}" - cp -p "${targetVolume}/boot" "${backupDir}/boot" +if [[ -d "$backupDir" ]];then + # Backup stage2 + if [[ -f "${targetVolume}/boot" ]];then + echo "Backing up stage2 file ${targetVolume}/boot to ${backupDir}/boot" >>"${logFile}" + cp -p "${targetVolume}/boot" "${backupDir}/boot" + fi + # Backup /Extra directory + if [[ -d "${targetVolume}/Extra" ]];then + echo "Moving ${targetVolume}/Extra folder to ${backupDir}/Extra" >>"${logFile}" + cp -pR "${targetVolume}/Extra" "${backupDir}/Extra" + fi + + chflags -R nohidden "$backupDir" # Remove the invisible flag of files in the backups + echo "======================================================" >>"${logFile}" fi -# Backup /Extra directory -if [[ -d "${targetVolume}/Extra" ]];then - echo "Moving ${targetVolume}/Extra folder to ${backupDir}/Extra" >>"${logFile}" - cp -pR "${targetVolume}/Extra" "${backupDir}/Extra" -fi -chflags -R nohidden "$backupDir" # Remove the invisible flag of files in the backups -echo "======================================================" >>"${logFile}" echo "===============================================" echo "END - Pre-Install Script"