-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.sh
executable file
·77 lines (56 loc) · 1.26 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh
# Author KMS - Martin Dubois, P.Eng.
# Copyright (C) 2020-2021 KMS
# License http://www.apache.org/licenses/LICENSE-2.0
# Product KmsBase
# File Build.sh
# Usage ./Build.sh
# CODE REVIEW 2021-08-17 KMS - Martin Dubois, P.Eng.
echo Executing Build.sh ...
# ===== Initialisation ======================================================
KMS_VERSION=Binaries/KmsVersion
OS=`uname`
VERSION_H=Common/Version.h
EXPORT_SH_TXT=Export.$OS.sh.txt
# ===== Execution ===========================================================
if [ ! -d Binaries ]
then
mkdir Binaries
fi
if [ ! -d Libraries ]
then
mkdir Libraries
fi
./Clean.sh
./Make.sh
if [ $? -ne 0 ]
then
echo ERROR ./Make.sh failed
exit 10
fi
./Test.sh
if [ $? -ne 0 ]
then
echo ERROR Test.sh failed
exit 20
fi
$KMS_VERSION $VERSION_H CreatePackages.sh $EXPORT_SH_TXT
if [ $? -ne 0 ]
then
echo ERROR $KMS_VERSION $VERSION_H CreatePackages.sh $EXPORT_SH_TXT failed
exit 25
fi
./CreatePackages.sh
if [ $? -ne 0 ]
then
echo ERROR ./CreatePackages.sh failed
exit 30
fi
$KMS_VERSION -S $VERSION_H ./Export.sh
if [ $? -ne 0 ]
then
echo ERROR $KMS_VERSION -S $VERSION_H ./Export.sh failed
exit 40
fi
# ===== End =================================================================
echo OK