-
Notifications
You must be signed in to change notification settings - Fork 0
/
execute-build.sh
executable file
·57 lines (48 loc) · 1.26 KB
/
execute-build.sh
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
#!/bin/bash
export RUNMODE=$1
export VERSION=$2
NEEDHELP=0
if [ "$RUNMODE" == "help" ]; then
NEEDHELP=1
fi
if [ "$RUNMODE" == "--help" ]; then
NEEDHELP=1
fi
if [ $NEEDHELP == 1 ]; then
echo "Usage: ./execute-build.sh [OPTIONS]"
echo "Options:"
echo " runmode - should be \"jenkins\" or \"normal\" "
echo " version - should be the docker image tag needed for images baked into the iso"
echo " "
echo "Example commandline:"
echo "./execute-build.sh jenkins latest"
echo "./execute-build.sh normal release"
exit 0
fi
# If the first parameter was empty, assume no parameters were given
if [ "$RUNMODE" == "" ]; then
export RUNMODE="normal"
echo "RUNMODE WAS BLANK"
else
if [ "$RUNMODE" != "normal" ]; then #runmode is not normal
if [ "$RUNMODE" != "jenkins" ]; then #runmode is also not jenkins
# hardcode runmode to normal, take what was passed in as the version
export RUNMODE="normal"
export VERSION=$1
else
#runmode is jenkins
echo "RUNMODE = $RUNMODE"
echo "VERSION = $VERSION"
fi
else
#runmode is normal
echo "RUNMODE = $RUNMODE"
echo "VERSION = $VERSION"
fi
fi
if [ "$VERSION" == "" ]; then
export VERSION="latest"
fi
./unsquash.sh "$RUNMODE" "$VERSION"
./resquash.sh
./build-iso.sh