-
-
Notifications
You must be signed in to change notification settings - Fork 973
Expand file tree
/
Copy pathlinux-prebuild.sh
More file actions
executable file
·40 lines (33 loc) · 975 Bytes
/
linux-prebuild.sh
File metadata and controls
executable file
·40 lines (33 loc) · 975 Bytes
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
#!/bin/bash
set -e # Quit script on error
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
WORKING_DIR="$(pwd)"
args=("$@")
system_libs=false
# extract options and their arguments into variables.
while [ -n "$1" ]; do
case "$1" in
-c|--config)
shift 2
;;
-n|--no-imgui)
shift
;;
-s|--system-libs|-o|--offline-build)
system_libs=true
shift
;;
--) shift ; break ;;
*) echo "Invalid argument: $1" ; exit 1 ;;
esac
done
cd "${SCRIPT_DIR}"
if [ ! "$system_libs" == true ]; then
"${SCRIPT_DIR}"/linux-pre-vcpkg.sh "${args[@]}"
"${SCRIPT_DIR}"/linux-pre-vcpkg.sh "${args[@]}"
fi
echo "Compiling native ruby extensions..."
ruby "${SCRIPT_DIR}"/server/ruby/bin/compile-extensions.rb
"${SCRIPT_DIR}"/linux-pre-translations.sh "${args[@]}"
# Restore working directory as it was prior to this script running...
cd "${WORKING_DIR}"