Merge pull request #3334 from eht16/show_d_python_global_class_calltips
[geany-mirror.git] / src / geany-run-helper.bat
blob4c3c6ead3b0ca81ace16bf2427163576352dd50a
1 REM USAGE: geany-run-helper DIRECTORY AUTOCLOSE COMMAND...\r
2 \r
3 REM unnecessary, but we get the directory\r
4 cd %1\r
5 shift\r
6 REM save autoclose option and remove it\r
7 set autoclose=%1\r
8 shift\r
9 \r
10 REM spawn the child\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
13 set SPAWN=\r
14 :argloop\r
15 if -%1-==-- goto argloop_end\r
16         set SPAWN=%SPAWN% %1\r
17         shift\r
18 goto argloop\r
19 :argloop_end\r
20 %SPAWN%\r
22 REM show the result\r
23 echo:\r
24 echo:\r
25 echo:------------------\r
26 echo:(program exited with code: %ERRORLEVEL%)\r
27 echo:\r
29 REM and if wanted, wait on the user\r
30 if not %autoclose%==1 pause\r