forked from zamronypj/mod_pascal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·45 lines (35 loc) · 1 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
#-----------------------------------------
# mod_pascal
# Apache 2.4 module which can execute
# Pascal program
#
# @link https://github.com/zamronypj/mod_pascal
# @copyright Copyright (c) 2020 Zamrony P. Juhara
# @license https://github.com/zamronypj/mod_pascal/blob/master/LICENSE (LGPL-2.1)
#------------------------------------------
#!/bin/bash
#------------------------------------------------------
# Build script for Linux
#------------------------------------------------------
if [ -z "${BUILD_TYPE}" ]; then
export BUILD_TYPE="prod"
fi
if [ -z "${SRC_DIR}" ]; then
export SRC_DIR="src"
fi
if [ -z "${UNIT_OUTPUT_DIR}" ]; then
export UNIT_OUTPUT_DIR="bin/unit"
fi
if [ -z "${LIB_OUTPUT_DIR}" ]; then
export LIB_OUTPUT_DIR="bin"
fi
if [ -z "${LIB_OUTPUT_NAME}" ]; then
export LIB_OUTPUT_NAME="mod_pascal.so"
fi
if [ -z "${SOURCE_LIB_NAME}" ]; then
export SOURCE_LIB_NAME="mod_pascal.pas"
fi
if [ -z "${FPC_BIN}" ]; then
export FPC_BIN="fpc"
fi
${FPC_BIN} @build.cfg ${SRC_DIR}/${SOURCE_LIB_NAME}