aboutsummaryrefslogtreecommitdiff
path: root/tbrun.sh
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-05-01 03:53:58 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-05-01 03:53:58 +0200
commitfb96ec752215da56407c2266ab9d1eedf670e0d1 (patch)
tree9654257120ab890720946e5bc23bff9df0803348 /tbrun.sh
parent08eada80a4fd13028f2a19108788f76752cc459b (diff)
downloadstalag-fb96ec752215da56407c2266ab9d1eedf670e0d1.tar.gz
Custom --width and --height cli argument
Diffstat (limited to 'tbrun.sh')
-rwxr-xr-xtbrun.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/tbrun.sh b/tbrun.sh
index bf810bc..8a600b7 100755
--- a/tbrun.sh
+++ b/tbrun.sh
@@ -20,6 +20,8 @@ echo "$SCRIPT_DIR"
20 20
21MAP="" 21MAP=""
22FPS="" 22FPS=""
23WIDTH=""
24HEIGHT=""
23while [ $# -gt 0 ]; do 25while [ $# -gt 0 ]; do
24 case "$1" in 26 case "$1" in
25 --map) 27 --map)
@@ -36,6 +38,20 @@ while [ $# -gt 0 ]; do
36 --fps=*) 38 --fps=*)
37 FPS="${1#--fps=}" 39 FPS="${1#--fps=}"
38 ;; 40 ;;
41 --width)
42 shift
43 WIDTH="$1"
44 ;;
45 --width=*)
46 WIDTH="${1#--width=}"
47 ;;
48 --height)
49 shift
50 HEIGHT="$1"
51 ;;
52 --height=*)
53 HEIGHT="${1#--height=}"
54 ;;
39 --) shift; break;; 55 --) shift; break;;
40 *) ;; 56 *) ;;
41 esac 57 esac
@@ -43,4 +59,7 @@ while [ $# -gt 0 ]; do
43done 59done
44 60
45cd "$SCRIPT_DIR" 61cd "$SCRIPT_DIR"
46./bin/stalag --map "$MAP" --fps "$FPS" 62./bin/stalag --map "$MAP" \
63 ${FPS:+--fps "$FPS"} \
64 ${WIDTH:+--width "$WIDTH"} \
65 ${HEIGHT:+--height "$HEIGHT"}