mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Handle case when 'ede-launch ede-launch ...' was given.
This commit is contained in:
parent
89589e95b1
commit
6ef8fead33
@ -531,18 +531,18 @@ static const char* next_param(int curr, char **argv, int argc) {
|
|||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
EDE_APPLICATION("ede-launch");
|
EDE_APPLICATION("ede-launch");
|
||||||
|
|
||||||
/* start dialog if we have nothing */
|
|
||||||
if(argc <= 1)
|
|
||||||
return start_dialog(argc, argv);
|
|
||||||
|
|
||||||
int ca = 1; /* current argument index */
|
int ca = 1; /* current argument index */
|
||||||
const char *cwd, *launch_type;
|
const char *cwd, *launch_type;
|
||||||
cwd = launch_type = 0;
|
cwd = launch_type = 0;
|
||||||
|
|
||||||
/* in case if ede-launch launches itself; just skip ourself and use the rest of arguments */
|
/* in case if ede-launch launches itself; just skip ourself and use the rest of arguments */
|
||||||
if(strstr(argv[ca], "ede-launch"))
|
while(argv[ca] && strstr(argv[ca], "ede-launch") != NULL)
|
||||||
ca++;
|
ca++;
|
||||||
|
|
||||||
|
/* start dialog if we have nothing */
|
||||||
|
if(!argv[ca])
|
||||||
|
return start_dialog(argc, argv);
|
||||||
|
|
||||||
/* parse args and stop as soon as detected first non-parameter value (not counting parameter values) */
|
/* parse args and stop as soon as detected first non-parameter value (not counting parameter values) */
|
||||||
for(; ca < argc; ca++) {
|
for(; ca < argc; ca++) {
|
||||||
if(argv[ca][0] != '-') break;
|
if(argv[ca][0] != '-') break;
|
||||||
|
Loading…
Reference in New Issue
Block a user