forked from enlightenment/efl
edje_decc: option to output to current directory.
SVN revision: 44133
This commit is contained in:
parent
6396f3fb00
commit
6ab03e1d93
|
@ -31,6 +31,7 @@ Font_List *fontlist = NULL;
|
||||||
|
|
||||||
int line = 0;
|
int line = 0;
|
||||||
int build_sh = 1;
|
int build_sh = 1;
|
||||||
|
int new_dir = 1;
|
||||||
|
|
||||||
int decomp(void);
|
int decomp(void);
|
||||||
void output(void);
|
void output(void);
|
||||||
|
@ -42,7 +43,7 @@ main_help(void)
|
||||||
{
|
{
|
||||||
printf
|
printf
|
||||||
("Usage:\n"
|
("Usage:\n"
|
||||||
"\t%s input_file.edj [-main-out file.edc] [-no-build-sh]\n"
|
"\t%s input_file.edj [-main-out file.edc] [-no-build-sh] [-current-dir]\n"
|
||||||
"\n"
|
"\n"
|
||||||
,progname);
|
,progname);
|
||||||
}
|
}
|
||||||
|
@ -69,6 +70,8 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
else if (!strcmp(argv[i], "-no-build-sh"))
|
else if (!strcmp(argv[i], "-no-build-sh"))
|
||||||
build_sh = 0;
|
build_sh = 0;
|
||||||
|
else if (!strcmp(argv[i], "-current-dir"))
|
||||||
|
new_dir = 0;
|
||||||
}
|
}
|
||||||
if (!file_in)
|
if (!file_in)
|
||||||
{
|
{
|
||||||
|
@ -141,6 +144,10 @@ output(void)
|
||||||
SrcFile *sf;
|
SrcFile *sf;
|
||||||
char *outdir, *p;
|
char *outdir, *p;
|
||||||
|
|
||||||
|
if (!new_dir)
|
||||||
|
outdir = strdup(".");
|
||||||
|
else
|
||||||
|
{
|
||||||
p = strrchr(file_in, '/');
|
p = strrchr(file_in, '/');
|
||||||
if (p)
|
if (p)
|
||||||
outdir = strdup(p + 1);
|
outdir = strdup(p + 1);
|
||||||
|
@ -148,8 +155,9 @@ output(void)
|
||||||
outdir = strdup(file_in);
|
outdir = strdup(file_in);
|
||||||
p = strrchr(outdir, '.');
|
p = strrchr(outdir, '.');
|
||||||
if (p) *p = 0;
|
if (p) *p = 0;
|
||||||
|
|
||||||
ecore_file_mkpath(outdir);
|
ecore_file_mkpath(outdir);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ef = eet_open(file_in, EET_FILE_MODE_READ);
|
ef = eet_open(file_in, EET_FILE_MODE_READ);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue