File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed
scriptmodules/supplementary/runcommand Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -1201,18 +1201,21 @@ function get_sys_command() {
1201
1201
quake_dir=" ${quake_dir%/* } "
1202
1202
COMMAND=" ${COMMAND// \% QUAKEDIR\% / \" $quake_dir \" } "
1203
1203
1204
- # if it starts with CON: it is a console application (so we don't redirect stdout later)
1205
- if [[ " $COMMAND " == CON:* ]]; then
1206
- # remove CON:
1207
- COMMAND=" ${COMMAND: 4} "
1208
- CONSOLE_OUT=1
1209
- fi
1210
-
1211
- # if it starts with XINIT: it is an X11 application (so we need to launch via xinit)
1212
- if [[ " $COMMAND " == XINIT:* ]]; then
1213
- # remove XINIT:
1214
- COMMAND=" ${COMMAND: 6} "
1215
- XINIT=1
1204
+ # check if COMMAND starts with a launch OPTION:
1205
+ if [[ " $COMMAND " =~ ^([A-Z\-]+?):(.*)$ ]]; then
1206
+ # extract the command
1207
+ COMMAND=" ${BASH_REMATCH[2]} "
1208
+
1209
+ case " ${BASH_REMATCH[1]} " in
1210
+ # if it starts with CON: it is a console application (so we don't redirect stdout later)
1211
+ CON)
1212
+ CONSOLE_OUT=1
1213
+ ;;
1214
+ # if it starts with XINIT: it is an X11 application (so we need to launch via xinit)
1215
+ XINIT*)
1216
+ XINIT=1
1217
+ ;;
1218
+ esac
1216
1219
fi
1217
1220
}
1218
1221
You can’t perform that action at this time.
0 commit comments