Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make jshint-rhino.js runnable

Add a shebang to jshint-rhino.js to tell the shell how to execute the
file and mark it executable after build.

Note1:  Ignore the return code of chmod in case the user is on a
filesystem which does not support setting execute permission.
Note2:  Make use  of /usr/bin/env to catch rhino anywhere in the PATH.

Also reformat the rhino build target slightly to match the other targets
(replace chained '&&' with separate shell commands).  Combine multiple
invocations of cat into one.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
  • Loading branch information...
commit 22b65d5b8acab8dd2a6649bd2a181ab302992eed 1 parent 0e1f45e
@kevinoid kevinoid authored valueof committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 Makefile
View
7 Makefile
@@ -3,9 +3,10 @@ build_dir:
rhino: build_dir
@echo "Building JSHint for Rhino"
- @cat "jshint.js" > "build/jshint-rhino.js" && \
- cat "env/rhino.js" >> "build/jshint-rhino.js" && \
- echo "Done"
+ @echo "#!/usr/bin/env rhino" > "build/jshint-rhino.js"
+ @cat "jshint.js" "env/rhino.js" >> "build/jshint-rhino.js"
+ -@chmod +x "build/jshint-rhino.js"
+ @echo "Done"
test:
@echo "Running unit tests"
Please sign in to comment.
Something went wrong with that request. Please try again.