summaryrefslogtreecommitdiff
path: root/.nea/docker/entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to '.nea/docker/entrypoint.sh')
-rw-r--r--.nea/docker/entrypoint.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/.nea/docker/entrypoint.sh b/.nea/docker/entrypoint.sh
new file mode 100644
index 0000000..416fac5
--- /dev/null
+++ b/.nea/docker/entrypoint.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+RED='\033[1;91m'
+GREEN='\033[1;92m'
+BLUE='\033[1;94m'
+NC='\033[0m'
+
+
+tryit(){
+ "$@"
+ local status=$?
+ if [ $status -ne 0 ]; then
+ echo -e "${RED}Error occurred with $1 ${NC}" >&2
+ exit $status
+ fi
+ return $status
+}
+
+
+# run donjon as the default entrypoint, as donjon can run dragon
+cd Donjon
+tryit ./rdonjon $@