forked from PhantomBot/PhantomBot
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 674 Bytes
/
Makefile
File metadata and controls
30 lines (23 loc) · 674 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
#!/usr/bin/make
.PHONY: build run rebuild kill
PROJECT_NAME = PhantomBot
PROJECT_VERSION = custom
BASEDIR = "./dist"
BUILDDIR := "${PROJECT_NAME}-${PROJECT_VERSION}"
RUNTIMEPATH := "${BUILDDIR}/java-runtime-linux/bin/java"
LAUNCHPATH := "${BUILDDIR}/launch-service.sh"
export LAUNCHPATH
build:
echo "Building PhantomBot!" \
&& mkdir -p "${BASEDIR}" \
&& cd "${BASEDIR}" \
&& ant -noinput -buildfile ../build.xml -Disdocker=true ${ANT_ARGS} jar \
&& chmod u+x ${RUNTIMEPATH} \
&& chmod u+x ${LAUNCHPATH}
run:
if [ -f ${JARPATH} ]; then \
${BASEDIR}/${LAUNCHPATH}; \
fi;
rebuild: build run
kill:
kill $$(ps aux | grep '[P]hantomBot.jar' | awk '{print $$2}')