Chameleon Applications

Chameleon Applications Commit Details

Date:2011-11-19 06:28:46 (12 years 4 months ago)
Author:Rekursor
Commit:349
Parents: 348
Message:Enhanced cd boot creator so that it can dynamically recreate the boot cd arch from the current extra and a cdboot dir location.
Changes:
M/trunk/ChameleonPrefPane/Resources/cdBootCreator.sh

File differences

trunk/ChameleonPrefPane/Resources/cdBootCreator.sh
11
22
33
4
5
6
7
8
49
510
6
11
12
13
14
15
16
17
18
19
20
21
722
23
824
9
25
1026
1127
12
13
14
15
28
29
30
31
1632
1733
1834
......
2036
2137
2238
23
39
2440
2541
2642
2743
2844
29
45
3046
31
47
3248
3349
34
50
3551
3652
3753
3854
3955
4056
41
42
57
58
4359
60
61
62
4463
64
65
66
67
4568
4669
4770
......
7699
77100
78101
102
103
104
79105
80106
81107
#!/bin/sh
# Copyright 2009 org.darwinx86.app. All rights reserved.
#
# Modified Nov 18th 2011 by Rekursor
# Added 2 parameters to specify repectively :
# $1 = Extra dir location
# $2 = cdboot file dir location
# Directories
extra=/tmp/isodir
if [[ $# < 1 ]];then
extra="/Extra"
else
extra="$1"
fi
if [[ $# < 2 ]];then
cdBootDir="${extra}"
else
cdBootDir="$2"
fi
echo Extra dir is ${extra} cdBootDir is ${cdBootDir}
mydir=`dirname $0`
tempDir=/tmp
finaldir=~/Desktop
finaldir=~/Desktop/Chameleon
isodir=/tmp/newiso
extradir=/tmp/newiso/Extra
preDir=/tmp/newiso/Extra/Preboot/
prebootDir=/tmp/newiso/Extra/Preboot/Extra
backDir=~/Desktop/Lizard
bkpdir=~/Desktop/Lizard/Previous-dmg
preDir=/tmp/newiso/Extra/Preboot
prebootDir="${preDir}/Extra"
backDir=$finaldir
bkpdir="${finaldir}/Previous-dmg"
echo "Starting script..."
if ([ ! -f $extra/Extensions.mkext ] && [ ! -d $extra/Extensions ]);then
echo "- Error: no Extensions.mkext or Extensions folder. One of them is required"
echo " ------------------------"
exit
exit 1
fi
if [ ! -f $extra/org.chameleon.Boot.plist ];then
echo "- Error: no org.chameleon.Boot.plist found. File required"
echo " ------------------------"
exit
exit 1
fi
if [ ! -f $extra/cdboot ];then
if [ ! -f $cdBootDir/cdboot ];then
echo "- Error: no cdboot found. File required"
echo " ------------------------"
exit
exit 1
fi
# Create a work directory
echo " - temps folders created"
echo " - Checking files"
#copy Extra files to temp directory
if [ -f $extra/cdboot ];then
cp -R $extra/cdboot $isodir
if ([ ! -d $prebootDir ]);then
mkdir -p $prebootDir
fi
if ([ ! -d $bkpdir ]);then
mkdir -p $bkpdir
fi
if [ -f $cdBootDir/cdboot ];then
cp -R $cdBootDir/cdboot $isodir
fi
if [ -f $extra/dsdt.aml ];then
cp -R $extra/dsdt.aml $prebootDir
fi
echo "- Files copied in temp folder"
# ramdisk creator
if [ -f $extradir/Preboot.dmg ];then
rm $extradir/Preboot.dmg
fi
hdiutil create -srcfolder $preDir/ -layout GPTSPUD -fs HFS+ -format UDRW -volname Preboot $extradir/Preboot.dmg
rm -R $preDir
echo " - ram disk created"

Archive Download the corresponding diff file

Revision: 349