Root/
| |
---|---|
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␊ |
6 | extra=/tmp/isodir␊ |
7 | mydir=`dirname $0`␊ |
8 | tempDir=/tmp␊ |
9 | finaldir=~/Desktop␊ |
10 | isodir=/tmp/newiso␊ |
11 | extradir=/tmp/newiso/Extra␊ |
12 | preDir=/tmp/newiso/Extra/Preboot/␊ |
13 | prebootDir=/tmp/newiso/Extra/Preboot/Extra␊ |
14 | backDir=~/Desktop/Lizard␊ |
15 | bkpdir=~/Desktop/Lizard/Previous-dmg␊ |
16 | ␊ |
17 | echo "Starting script..."␊ |
18 | ␊ |
19 | #errors␊ |
20 | if ([ ! -f $extra/Extensions.mkext ] && [ ! -d $extra/Extensions ]);then␊ |
21 | ␉echo "- Error: no Extensions.mkext or Extensions folder. One of them is required"␊ |
22 | ␉echo " ------------------------"␊ |
23 | ␉exit␊ |
24 | fi␊ |
25 | ␊ |
26 | if [ ! -f $extra/com.apple.Boot.plist ];then␊ |
27 | echo "- Error: no com.apple.boot.plist found. File required"␊ |
28 | echo " ------------------------"␊ |
29 | exit␊ |
30 | fi␊ |
31 | if [ ! -f $extra/cdboot ];then␊ |
32 | echo "- Error: no cdboot found. File required"␊ |
33 | echo " ------------------------"␊ |
34 | exit␊ |
35 | fi␊ |
36 | ␊ |
37 | # Create a work directory␊ |
38 | echo " - temps folders created"␊ |
39 | echo " - Checking files"␊ |
40 | #copy Extra files to temp directory␊ |
41 | if [ -f $extra/cdboot ];then␊ |
42 | cp -R $extra/cdboot $isodir␊ |
43 | fi␊ |
44 | ␊ |
45 | if [ -f $extra/dsdt.aml ];then␊ |
46 | cp -R $extra/dsdt.aml $prebootDir␊ |
47 | fi␊ |
48 | ␊ |
49 | if [ -f $extra/DSDT.aml ];then␊ |
50 | ␉cp -R $extra/DSDT.aml $prebootDir␊ |
51 | fi␊ |
52 | ␊ |
53 | if [ -f $extra/NVIDIA.ROM ];then␊ |
54 | ␉cp -R $extra/NVIDIA.ROM $prebootDir␊ |
55 | fi␊ |
56 | ␊ |
57 | if [ -f $extra/smbios.plist ];then␊ |
58 | cp -R $extra/smbios.plist $prebootDir␊ |
59 | fi␊ |
60 | ␊ |
61 | if [ -f $extra/Extensions.mkext ];then␊ |
62 | cp -R $extra/Extensions.mkext $prebootDir␊ |
63 | fi␊ |
64 | ␊ |
65 | if [ -d $extra/Extensions ];then␊ |
66 | cp -Rp $extra/Extensions $prebootDir␊ |
67 | fi␊ |
68 | ␊ |
69 | if [ -f $extra/com.apple.Boot.plist ];then␊ |
70 | ␉cp -R $extra/com.apple.Boot.plist $prebootDir␊ |
71 | fi␊ |
72 | if [ -f $tempDir/com.apple.Boot.plist ];then␊ |
73 | cp -R $tempDir/com.apple.Boot.plist $extradir␊ |
74 | fi␊ |
75 | ␊ |
76 | echo "- Files copied in temp folder"␊ |
77 | ␊ |
78 | # ramdisk creator␊ |
79 | hdiutil create -srcfolder $preDir/ -layout GPTSPUD -fs HFS+ -format UDRW -volname Preboot $extradir/Preboot.dmg␊ |
80 | rm -R $preDir␊ |
81 | echo " - ram disk created"␊ |
82 | ␊ |
83 | # boot cd creator␊ |
84 | hdiutil 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"␊ |
85 | echo " - hybrid image created"␊ |
86 | ␊ |
87 | # Create output and backup directories␊ |
88 | if [ -f $finaldir/BootCD.iso ];then␊ |
89 | if [ ! -d $bkpdir ];then␊ |
90 | mkdir $backDir␊ |
91 | mkdir $bkpdir␊ |
92 | echo " - backup folder created"␊ |
93 | ␉fi␊ |
94 | mv -f $finaldir/BootCD.iso $bkpdir/BootCd-$(date +"%d-%y-%Hh%M").iso␊ |
95 | echo " - previous ISO moved into backup folder"␊ |
96 | fi␊ |
97 | mv BootCD.iso $finaldir␊ |
98 | echo " - ISO moved on desktop"␊ |
99 | ␊ |
100 | # cleanup␊ |
101 | echo " - Perform cleaning"␊ |
102 | echo " - ISO created succefully"␊ |
103 | echo " ------------------------"␊ |
104 | exit 0 |