1 REM USAGE: geany-run-helper DIRECTORY AUTOCLOSE COMMAND...
\r
3 REM unnecessary, but we get the directory
\r
6 REM save autoclose option and remove it
\r
11 REM it's tricky because shift doesn't affect %*, so hack it out
\r
12 REM https://en.wikibooks.org/wiki/Windows_Batch_Scripting#Command-line_arguments
\r
15 if -%1-==-- goto argloop_end
\r
16 set SPAWN=%SPAWN% %1
\r
25 echo:------------------
\r
26 echo:(program exited with code: %ERRORLEVEL%)
\r
29 REM and if wanted, wait on the user
\r
30 if not %autoclose%==1 pause
\r