Chameleon Applications

Chameleon Applications Svn Source Tree

Root/branches/iFabio/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/cdBootCreator.sh

  • Property svn:executable set to
Source at commit 214 created 13 years 5 months ago.
By ifabio, update to chameleon trunk 630, and now the pakage folder is the same as blackosx branch, also add Icon "building" into buildpkg script, and add mint theme info into the English localizable.strings.
1#!/bin/sh
2
3# Copyright 2009 org.darwinx86.app. All rights reserved.
4
5# Directories
6extra=/tmp/isodir
7mydir=`dirname $0`
8tempDir=/tmp
9finaldir=~/Desktop
10isodir=/tmp/newiso
11extradir=/tmp/newiso/Extra
12preDir=/tmp/newiso/Extra/Preboot/
13prebootDir=/tmp/newiso/Extra/Preboot/Extra
14backDir=~/Desktop/Lizard
15bkpdir=~/Desktop/Lizard/Previous-dmg
16
17echo "Starting script..."
18
19#errors
20if ([ ! -f $extra/Extensions.mkext ] && [ ! -d $extra/Extensions ]);then
21echo "- Error: no Extensions.mkext or Extensions folder. One of them is required"
22echo " ------------------------"
23exit
24fi
25
26if [ ! -f $extra/com.apple.Boot.plist ];then
27 echo "- Error: no com.apple.boot.plist found. File required"
28 echo " ------------------------"
29 exit
30fi
31if [ ! -f $extra/cdboot ];then
32 echo "- Error: no cdboot found. File required"
33 echo " ------------------------"
34 exit
35fi
36
37# Create a work directory
38echo " - temps folders created"
39echo " - Checking files"
40#copy Extra files to temp directory
41if [ -f $extra/cdboot ];then
42 cp -R $extra/cdboot $isodir
43fi
44
45if [ -f $extra/dsdt.aml ];then
46 cp -R $extra/dsdt.aml $prebootDir
47fi
48
49if [ -f $extra/DSDT.aml ];then
50cp -R $extra/DSDT.aml $prebootDir
51fi
52
53if [ -f $extra/NVIDIA.ROM ];then
54cp -R $extra/NVIDIA.ROM $prebootDir
55fi
56
57if [ -f $extra/smbios.plist ];then
58 cp -R $extra/smbios.plist $prebootDir
59fi
60
61if [ -f $extra/Extensions.mkext ];then
62 cp -R $extra/Extensions.mkext $prebootDir
63fi
64
65if [ -d $extra/Extensions ];then
66 cp -Rp $extra/Extensions $prebootDir
67fi
68
69if [ -f $extra/com.apple.Boot.plist ];then
70 cp -R $extra/com.apple.Boot.plist $prebootDir
71fi
72if [ -f $tempDir/com.apple.Boot.plist ];then
73 cp -R $tempDir/com.apple.Boot.plist $extradir
74fi
75
76echo "- Files copied in temp folder"
77
78# ramdisk creator
79hdiutil create -srcfolder $preDir/ -layout GPTSPUD -fs HFS+ -format UDRW -volname Preboot $extradir/Preboot.dmg
80rm -R $preDir
81echo " - ram disk created"
82
83# boot cd creator
84hdiutil makehybrid -o BootCD.iso $isodir/ -iso -hfs -joliet -eltorito-boot $isodir/cdboot -no-emul-boot -hfs-volume-name "Boot CD" -joliet-volume-name "Boot CD"
85echo " - hybrid image created"
86
87# Create output and backup directories
88if [ -f $finaldir/BootCD.iso ];then
89 if [ ! -d $bkpdir ];then
90 mkdir $backDir
91 mkdir $bkpdir
92 echo " - backup folder created"
93fi
94 mv -f $finaldir/BootCD.iso $bkpdir/BootCd-$(date +"%d-%y-%Hh%M").iso
95 echo " - previous ISO moved into backup folder"
96fi
97mv BootCD.iso $finaldir
98echo " - ISO moved on desktop"
99
100# cleanup
101echo " - Perform cleaning"
102echo " - ISO created succefully"
103echo " ------------------------"
104exit 0

Archive Download this file

Revision: 214