-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·27 lines (22 loc) · 925 Bytes
/
build.sh
File metadata and controls
executable file
·27 lines (22 loc) · 925 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
#!/usr/bin/env bash
set -e
if [ "$#" -lt 1 ]; then
echo "Usage: ./build.sh <version> <mode>"
exit 1
fi
BUILD_VERSION=$1
MODE=${2:-watch}
DIR="$( cd "$( dirname $( dirname "${BASH_SOURCE[0]}" ) )" && pwd )"
# PREPARE
mkdir -p "$DIR/plugins"
chmod 777 "$DIR/plugins"
rm -f $DIR/plugins/*
docker run --rm \
-v "$DIR/plugins":/home/builder/builds \
-v "$DIR/scripting":/home/builder/sources \
-v "$DIR/scripting/include/colorchat.inc":/home/builder/addons/amxmodx/scripting/include/colorchat.inc \
-v "$DIR/scripting/include/custom_color_chat.inc":/home/builder/addons/amxmodx/scripting/include/custom_color_chat.inc \
-v "$DIR/scripting/include/shopsms_const.inc":/home/builder/addons/amxmodx/scripting/include/shopsms_const.inc \
-v "$DIR/scripting/include/shopsms.inc":/home/builder/addons/amxmodx/scripting/include/shopsms.inc \
budziam/amxmodx-builder:${BUILD_VERSION} \
${MODE}