-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdobuild
More file actions
executable file
·71 lines (59 loc) · 997 Bytes
/
dobuild
File metadata and controls
executable file
·71 lines (59 loc) · 997 Bytes
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
71
#!/bin/bash
#set -x
#####################################
#
# IBM Coporation
# Project kittyhawk
#
# dobuild
# script to create a kittyhawk software
# install from our repositories
#
#####################################
declare -r KHROOT=${KHROOT:-$(pwd)/$(date +%Y-%m-%d:%T)}
declare -r DEFAULTFUNCS=${DEFAULTFUNCS:-"doCreateTree doCheckouts doBuilds doInstalls"}
declare -r srcdir=$KHROOT/src
declare -r instdir=$KHROOT/install
function doCreateTree
{
for d in $srcdir $instdir
do
if [[ -d $d ]]
then
echo $d: exists skipping creation
else
mkdir -p $d
fi
done
}
function doCheckouts
{
cd $srcdir
for r in $repos
do
git clone $r.git
done
}
function doBuilds
{
}
function doInstalls
{
}
dofuncs=$1
if [[ $dofuncs = "-h" ]]
then
usage
exit -1
fi
# if explicit functions are specified then only run those
if [[ -z $dofuncs ]]
then
dofuncs=$DEFAULTFUNCS
fi
for f in $dofuncs
do
echo "running $f"
$f
done
exit 0