Chameleon

Chameleon Svn Source Tree

Root/branches/blackosx/package/Scripts/Install/WriteChameleonStage0.sh

  • Property svn:executable set to *
1#!/bin/bash
2
3echo "==============================================="
4echo "Write Chameleon Stage 0 Loader:"
5echo "*******************************"
6
7
8
9if [ "$#" -eq 7 ]; then
10diskupdate="$1"
11disksignature="$2"
12stage0Loader="$3"
13stage0Loaderdualboot="$4"
14targetDisk="$5"
15targetVolume="$6"
16scriptDir="$7"
17echo "DEBUG: passed argument for diskupdate = $diskupdate"
18echo "DEBUG: passed argument for disksignature = $disksignature"
19echo "DEBUG: passed argument for stage0Loader = $stage0Loader"
20echo "DEBUG: passed argument for stage0Loaderdualboot = $stage0Loaderdualboot"
21echo "DEBUG: passed argument for targetDisk = $targetDisk"
22echo "DEBUG: passed argument for targetVolume = $targetVolume"
23echo "DEBUG: passed argument for scriptDir = $scriptDir"
24else
25echo "Error - wrong number of values passed"
26exit 9
27fi
28
29if [ ${diskupdate} = "0" ]; then
30echo "Diskupdate = true, so yes"
31
32if [ ${disksignature} = "0" ]; then
33
34
35echo "Executing command: fdisk440 -u -f /usr/standalone/i386/${stage0Loader} -y ${targetDisk}"
36"${scriptDir}"/Tools/fdisk440 -u -f "${targetVolume}"/usr/standalone/i386/${stage0Loader} -y ${targetDisk}
37else
38# Windows is also installed on the HDD and we need to write boot0hfs
39
40echo "Executing command: /fdisk440 -u -f /usr/standalone/i386/${stage0Loaderdualboot} -y ${targetDisk}"
41"${scriptDir}"/Tools/fdisk440 -u -f "${targetVolume}"/usr/standalone/i386/${stage0Loaderdualboot} -y ${targetDisk}
42fi
43fi
44
45echo "-----------------------------------------------"
46echo ""
47echo ""
48
49exit 0

Archive Download this file

Revision: 1534