Chameleon Applications

Chameleon Applications Svn Source Tree

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

  • Property svn:executable set to *
1#!/bin/bash
2
3echo "==============================================="
4echo "Check Proceed: Can the script continue?"
5echo "***************************************"
6
7# Receives targetVolume and targetDevice
8# Checks the selected volume is present and the disk
9# is partitioned.
10
11if [ "$#" -eq 2 ]; then
12targetVolume="$1"
13targetDevice="$2"
14echo "DEBUG: passed argument for targetVolume = $targetVolume"
15echo "DEBUG: passed argument for targetDevice = $targetDevice"
16else
17echo "Error - wrong number of values passed"
18exit 9
19fi
20
21if [ -z "$targetVolume" ]; then
22echo "Cannot find the volume. Exiting."
23exit 1
24else
25echo "Confirming target volume exists"
26fi
27
28if [ "$targetDevice" = "$targetDevice#*disk*s" ]; then
29echo "ERROR Volume does not use slices."
30exit 1
31else
32echo "Confirming target device uses slices"
33fi
34
35echo "-----------------------------------------------"
36echo ""
37
38exit 0

Archive Download this file

Revision: 255