-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·47 lines (36 loc) · 1.06 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
#------------------------------------------------------------
# [[APP_NAME]] ([[APP_URL]])
#
# @link [[APP_REPOSITORY_URL]]
# @copyright Copyright (c) [[COPYRIGHT_YEAR]] [[COPYRIGHT_HOLDER]]
# @license [[LICENSE_URL]] ([[LICENSE]])
#--------------------------------------------------------------
#!/bin/bash
#------------------------------------------------------
# Build script for Linux
#------------------------------------------------------
if [ -z "${FANO_DIR}" ]; then
export FANO_DIR="vendor/fano"
fi
if [ -z "${BUILD_TYPE}" ]; then
export BUILD_TYPE="prod"
fi
if [ -z "${USER_APP_DIR}" ]; then
export USER_APP_DIR="src"
fi
if [ -z "${UNIT_OUTPUT_DIR}" ]; then
export UNIT_OUTPUT_DIR="bin/unit"
fi
if [ -z "${EXEC_OUTPUT_DIR}" ]; then
export EXEC_OUTPUT_DIR="bin"
fi
if [ -z "${EXEC_OUTPUT_NAME}" ]; then
export EXEC_OUTPUT_NAME="app.cgi"
fi
if [ -z "${SOURCE_PROGRAM_NAME}" ]; then
export SOURCE_PROGRAM_NAME="app.pas"
fi
if [ -z "${FPC_BIN}" ]; then
export FPC_BIN="fpc"
fi
${FPC_BIN} @vendor/fano/fano.cfg @build.cfg ${USER_APP_DIR}/${SOURCE_PROGRAM_NAME}