Implement the run helper as a script
[geany-mirror.git] / src / geany-run-helper
blobfbe9dfcc19f86fa4e4db8b2fdd35b1d5a40c29f6
1 #!/bin/sh
2 # USAGE: geany-run-helper AUTOCLOSE COMMAND...
4 # save autoclose option and remove it
5 autoclose=$1
6 shift
8 # spawn the child
9 "$@"
11 # show the result
12 echo "
14 ------------------
15 (program exited with code: $?)
18 # and if wanted, wait on the user
19 if ! [ "$autoclose" = 0 ]
20 then
21 echo "Press return to continue"
22 # to be more compatible with shells like dash
23 dummy_var=
24 read dummy_var