# ---------------------------------------------␊ |
# 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"␊ |