Chameleon Applications

Chameleon Applications Svn Source Tree

Root/branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/postflight.sh

  • Property svn:executable set to *
1#!/bin/bash
2
3echo "==============================================="
4echo "Entered Postflight Script"
5echo "*************************"
6
7# Find location of this script in the package installer
8# so we know where all the other scripts are located.
9
10MYLOCATION="${PWD}/${BASH_ARGV[0]}"
11export MYLOCATION="${MYLOCATION%/*}"
12scriptDir=$MYLOCATION
13
14
15# Run script to create com.apple.Boot.plist
16# and pass it the installer destination.
17
18"$scriptDir"BuildBootOptions.sh "${3}"
19
20
21# Has the temporary directory /.Chameleon/Extra been created?
22# If yes then transfer temporary com.apple.Boot.plist to destination.
23
24if [ -d ${3}/.Chameleon/Extra ]; then
25
26# check to see if install to EFI system partition was selected
27# if chosen, the package installer will add a file named 'nullESP'
28# in to the temporary directory /.Chameleon
29
30if [ -f ${3}/.Chameleon/nullESP ]; then
31echo "Executing command: mv -f ${3}/.Chameleon/Extra /Volumes/EFI"
32mv -f ${3}/.Chameleon/Extra /Volumes/EFI
33
34echo "Executing command: umount -f Volumes/EFI"
35"$scriptDir"UnMountEFIvolumes.sh
36returnValue=$?
37if [ ${returnValue} = 0 ]; then
38rm -R -f /Volumes/EFI
39fi
40else
41echo "Executing command: mv -f ${3}/.Chameleon/Extra ${3}/"
42mv -f ${3}/.Chameleon/Extra ${3}/
43fi
44
45fi
46
47echo "==============================================="
48echo "Clean Up"
49echo "*************************"
50
51# remove the temporary /.Chameleon directory
52echo "Executing command: rm -r ${3}/.Chameleon/"
53rm -r ${3}/.Chameleon/
54
55# remove the temporary boot sector files if they exist
56if [ -d /tmp/newbs ]; then
57echo "Executing command: rm /tmp/newbs"
58rm /tmp/newbs
59fi
60if [ -d /tmp/origbs ]; then
61echo "Executing command: rm /tmp/origbs"
62rm /tmp/origbs
63fi
64
65
66exit 0
67

Archive Download this file

Revision: 221