1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-06 08:59:08 +03:00

r7223: Advance script past interpreter line.

(This used to be commit 31b9fadbed)
This commit is contained in:
Tim Potter
2005-06-03 12:04:26 +00:00
committed by Gerald (Jerry) Carter
parent 042ab1adbe
commit c1b95bd467

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);