Chameleon

Chameleon Commit Details

Date:2012-01-09 23:30:57 (12 years 2 months ago)
Author:blackosx
Commit:1781
Parents: 1780
Message:Apply the change for only creating Chameleon.Backups if required from commit 1771 in my branng to the trunk.
Changes:
M/trunk/package/Scripts.templates/Post/postinstall
M/trunk/package/Scripts.templates/Pre/preinstall

File differences

trunk/package/Scripts.templates/Post/postinstall
7373
7474
7575
76
77
7876
7977
8078
mkdir "$chamTemp"/Extra
fi
tempOCBP="$chamTemp"/Extra/org.chameleon.Boot.plist
# Create template for org.chameleon.Boot.plist"
tempOCBP="$chamTemp"/Extra/org.chameleon.Boot.plist
cp "$4"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist "$tempOCBP"
trunk/package/Scripts.templates/Pre/preinstall
77
88
99
10
11
10
11
12
1213
1314
15
16
1417
1518
19
1620
1721
1822
......
3438
3539
3640
37
41
3842
3943
40
41
4244
45
46
4347
4448
4549
4650
4751
48
52
4953
5054
5155
......
5862
5963
6064
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
6581
66
67
68
69
70
71
72
7382
7483
7584
echo ""
# Creates text file named '@LOG_FILENAME@'
# at the root of the target volume. This is to help show the
# user why the installation process failed (even though the
# at the root of the target volume. This is to give the user
# a record of the installation process and also to show why
# possibly the installation process failed (even though the
# package installer ends reading 'Installation Successful'.
# This script also prepares, then backs up any previous
# stage2 boot file, /Extra folder and install log if they exist.
# Find location of this script in the package installer
# so we know where all the other scripts are located.
logFile="${targetVolume}/$logName"
# ---------------------------------------------
# Preparing Backing up Chameleon files
# Preparing Backing up of Chameleon files
# ---------------------------------------------
backupDir="${targetVolume}/Chameleon.Backups/"$( date -j "+%F-%Hh%M" )
mkdir -p "$backupDir"
if [[ -f "$logFile" ]];then
# Only make backupDir if required
mkdir -p "$backupDir"
# Backup old log file
mv "$logFile" "${backupDir}/${logName}"
fi
# Setup @LOG_FILENAME@ file
# Setup Chameleon Log file
# by writing header and diskutil list
echo "Chameleon installer log - $( date )
# ---------------------------------------------
# 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 [[ -f "${targetVolume}/boot" ]] || [[ -d "${targetVolume}/Extra" ]];then
if [[ ! -d "$backupDir" ]];then
mkdir -p "$backupDir"
fi
# 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"

Archive Download the corresponding diff file

Revision: 1781