aboutsummaryrefslogtreecommitdiff
path: root/tbrun.sh
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-04-30 20:06:13 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-04-30 20:06:13 +0200
commite21ab733cc063527099bb819f64f4c7396059f03 (patch)
tree6702066e43ae0c793e35f6ed8b004af68a8c16db /tbrun.sh
parentb4d0ad9e95226d225d5361b1182866884aaa6366 (diff)
downloadstalag-e21ab733cc063527099bb819f64f4c7396059f03.tar.gz
Integration with TrenchbroomHEADmaster
Diffstat (limited to 'tbrun.sh')
-rwxr-xr-xtbrun.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/tbrun.sh b/tbrun.sh
new file mode 100755
index 0000000..d933b6d
--- /dev/null
+++ b/tbrun.sh
@@ -0,0 +1,38 @@
1#!/bin/sh
2
3SCRIPT="$0"
4case "$SCRIPT" in
5 /*) ;;
6 *) SCRIPT="$(pwd)/$SCRIPT" ;;
7esac
8
9# resolve symlinks
10while [ -L "$SCRIPT" ]; do
11 LINK="$(readlink "$SCRIPT")"
12 case "$LINK" in
13 /*) SCRIPT="$LINK" ;;
14 *) SCRIPT="$(dirname "$SCRIPT")/$LINK" ;;
15 esac
16done
17
18SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd -P)"
19echo "$SCRIPT_DIR"
20
21MAP=""
22while [ $# -gt 0 ]; do
23 case "$1" in
24 --map)
25 shift
26 MAP="$1"
27 ;;
28 --map=*)
29 MAP="${1#--map=}"
30 ;;
31 --) shift; break;;
32 *) ;;
33 esac
34 shift
35done
36
37cd "$SCRIPT_DIR"
38./bin/stalag --map "$MAP"