From fb96ec752215da56407c2266ab9d1eedf670e0d1 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 1 May 2026 03:53:58 +0200 Subject: Custom --width and --height cli argument --- tbrun.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'tbrun.sh') 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" MAP="" FPS="" +WIDTH="" +HEIGHT="" while [ $# -gt 0 ]; do case "$1" in --map) @@ -36,6 +38,20 @@ while [ $# -gt 0 ]; do --fps=*) FPS="${1#--fps=}" ;; + --width) + shift + WIDTH="$1" + ;; + --width=*) + WIDTH="${1#--width=}" + ;; + --height) + shift + HEIGHT="$1" + ;; + --height=*) + HEIGHT="${1#--height=}" + ;; --) shift; break;; *) ;; esac @@ -43,4 +59,7 @@ while [ $# -gt 0 ]; do done cd "$SCRIPT_DIR" -./bin/stalag --map "$MAP" --fps "$FPS" +./bin/stalag --map "$MAP" \ + ${FPS:+--fps "$FPS"} \ + ${WIDTH:+--width "$WIDTH"} \ + ${HEIGHT:+--height "$HEIGHT"} -- cgit v1.2.3