forked from zamronypj/fano-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·47 lines (36 loc) · 1.17 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
#------------------------------------------------------------
# Fano Web Framework Skeleton Application (https://fanoframework.github.io)
#
# @link https://github.com/fanoframework/fano-api
# @copyright Copyright (c) 2018 Zamrony P. Juhara
# @license https://github.com/fanoframework/fano-api/blob/master/LICENSE (GPL 2.0)
#-------------------------------------------------------------
#!/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="public"
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}