1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

r7223: Advance script past interpreter line.

This commit is contained in:
Tim Potter 2005-06-03 12:04:26 +00:00 committed by Gerald (Jerry) Carter
parent 615618f192
commit 31b9fadbed

View File

@ -83,6 +83,17 @@ void ejs_exception(const char *reason)
/* load the script and advance past interpreter line*/
script = file_load(argv[1], &script_size);
if ((script_size > 2) && script[0] == '#' && script[1] == '!') {
script += 2;
script_size -= 2;
while (script_size) {
if (*script == '\r' || *script == '\n')
break;
script++;
script_size--;
}
}
/* run the script */
if (ejsEvalScript(eid, script, &result, &emsg) == -1) {
fprintf(stderr, "smbscript: ejsEvalScript(): %s\n", emsg);