diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-09-01 16:01:39 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-09-01 16:01:39 +0200 |
commit | 6af54f5ebd69b52e2e1c5286f8fad436f8bb93c2 (patch) | |
tree | 6fd6a68a4f847dc0410ce8f07f7e7c0614f7a007 | |
parent | 6ecbff74ec1a5574b51ff3ececdcbca19f17ddcd (diff) | |
download | redo-c-6af54f5ebd69b52e2e1c5286f8fad436f8bb93c2.tar.gz redo-c-6af54f5ebd69b52e2e1c5286f8fad436f8bb93c2.tar.xz redo-c-6af54f5ebd69b52e2e1c5286f8fad436f8bb93c2.zip |
cleanup
-rw-r--r-- | redo.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/redo.c b/redo.c index 978e3d1..4351479 100644 --- a/redo.c +++ b/redo.c @@ -459,7 +459,6 @@ run_script(char *target, int implicit) char *orig_target = target; int old_dep_fd = dep_fd; int fd; - int shellwrap; char *dofile; pid_t pid; @@ -478,8 +477,6 @@ run_script(char *target, int implicit) exit(1); } - shellwrap = (access (dofile, X_OK) != 0); - fd = open(dofile, O_RDONLY); dprintf(dep_fd, "=%s %s\n", hashfile(fd), dofile); close(fd); @@ -515,7 +512,7 @@ djb-style default.o.do: setenvfd("REDO_DEP_FD", dep_fd); setenvfd("REDO_LEVEL", level + 1); - if (shellwrap) + if (access (dofile, X_OK) != 0) // run -x files with /bin/sh execl("/bin/sh", "/bin/sh", xflag > 0 ? "-ex" : "-e", dofile, target, basename, temp_target, (char *) 0); else |