-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathcreateTodeProjectStone
More file actions
executable file
·70 lines (55 loc) · 1.73 KB
/
createTodeProjectStone
File metadata and controls
executable file
·70 lines (55 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#! /bin/bash
#=========================================================================
# Copyright (c) 2015 GemTalk Systems, LLC <[email protected]>.
#=========================================================================
echo "================="
echo " GsDevKit script: $(basename $0) $*"
echo "================="
usage() {
cat <<HELP
USAGE: $(basename $0) [-h] [-n] [-s <snapshot-file-path>] <stone-name> <gemstone-version> <project-name>
Create a new stone <stone-name> with tODE and the <project-name> project
installed. The installation of <project-name> is based upon the informaton in
the tODE project entry for the project.
Start stone and netldi unless -n is specified.
If the -s option is not specified, $GEMSTONE/bin/extent0.seaside.dbf will be used as
the initial extent.
If you create a stone from an extent snapshot, you should use the -N
option to start the stone, the first time.
OPTIONS
-h
display help
-n
No startStone, no startNetldi.
-s <snapshot-file-path>
Path to snapshot file used to create stone.
EXAMPLES
$(basename $0) -h
$(basename $0) kit 3.2.4 Flow
"
HELP
}
set -e # exit on error
if [ "${GS_HOME}x" = "x" ] ; then
echo "the GS_HOME environment variable needs to be defined"; exit 1
fi
snapshotFileArg=""
noRestartArg=""
while getopts "hns:" OPT ; do
case "$OPT" in
h) usage; exit 0;;
n) noRestartArg=" -n ";;
s) snapshotFileArg=" -s ${OPTARG} ";;
*) usage; exit 1;;
esac
done
shift $(($OPTIND - 1))
if [ $# -ne 3 ]; then
usage; exit 1
fi
stoneName="$1"
gsvers="$2"
projectName="$3"
$GS_HOME/bin/createTodeStone $noRestartArg $snapshotFileArg $stoneName $gsvers
$GS_HOME/bin/installTodeProjectStone $stoneName $projectName
echo "...finished $(basename $0)"