Chameleon Applications

Chameleon Applications Commit Details

Date:2010-11-03 03:28:26 (13 years 4 months ago)
Author:blackosx
Commit:208
Parents: 207
Message:Revised the Post script further.
Changes:
M/branches/blackosx/trunk/package/Scripts/Post/postinstall

File differences

branches/blackosx/trunk/package/Scripts/Post/postinstall
33
44
55
6
7
6
7
88
99
1010
1111
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
1238
1339
1440
1541
1642
1743
18
19
20
21
22
23
24
2544
2645
27
28
29
30
31
32
33
46
47
3448
35
36
37
38
39
40
41
42
43
44
45
46
4749
48
49
5050
5151
5252
......
6565
6666
6767
68
68
6969
7070
71
72
73
74
7175
7276
7377
main ()
{
echo "==============================================="
echo "set com.apple.Boot.plist options"
echo "****************************************"
echo "set com.apple.Boot.plist variables"
echo "**********************************"
temp="/private/tmp/Chameleon"
echo "Temp is ${temp}"
bootplist="${3}/.Chameleon/Extra/com.apple.Boot.plist"
echo "bootplist = ${bootplist}"
systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
echo "systemplist= ${systemplist}"
echo "if no directory exists named ${bootplist%/*} then mkdir ${bootplist%/*}"
[ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
if [ ! -f "${bootplist}" ]; then
echo "${bootplist} doesn't exist"
if [ -f "${systemplist}" ]; then
echo "${systemplist} doesn't exist"
echo "copy ${systemplist} to ${bootplist}"
cp "${systemplist}" "${bootplist}"
fi
fi
echo "-----------------------------------------------"
echo ""
echo ""
echo "==============================================="
echo "Build Extra/com.apple.Boot.plist"
echo "********************************"
cd ${temp}
Dirlist=$(find . -type d | grep "/")
for directory in $Dirlist ; do
overide=$(echo $directory | sed 's/_/ /g' | tr -d "./@" |cut -d '+' -f1)
string=$(echo $directory | tr -d "./@" |cut -d'+' -f2)
bootplist="${3}/.Chameleon/Extra/com.apple.Boot.plist"
echo "bootplist = ${bootplist}"
systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
echo "systemplist= ${systemplist}"
echo ""
bootoptionshdextra[1]="<key>${overide}</key>"
bootoptionshdextra[2]="<string>${string}</string>"
echo "bootoptionshdextra 1 = ${bootoptionshdextra[1]}"
echo "bootoptionshdextra 2= ${bootoptionshdextra[2]}"
echo ""
echo "if no directory exists named ${bootplist%/*} then mkdir ${bootplist%/*}"
echo ""
[ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
#echo "bootoptionshdextra 1 = ${bootoptionshdextra[1]}"
#echo "bootoptionshdextra 2= ${bootoptionshdextra[2]}"
echo "if ${bootplist} doesn't exist"
echo ""
if [ ! -f "${bootplist}" ]; then
echo "if ${systemplist} doesn't exist"
echo ""
if [ -f "${systemplist}" ]; then
echo "copy ${systemplist} to ${systemplist}"
echo ""
cp "${systemplist}" "${bootplist}"
fi
fi
xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
echo "xmlvalue = ${xmlvalue}"
echo ""
case "${xmlvalue:0:1}" in
;;
esac
echo "set owner privileges for ${bootplist}"
#echo "set owner privileges for ${bootplist}"
chown "${USER}:20" "${bootplist}"
done
echo "-----------------------------------------------"
echo ""
echo ""
}
getxmlvalue ()

Archive Download the corresponding diff file

Revision: 208