diff options
author | isaacs <i@izs.me> | 2012-07-13 22:46:25 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-07-13 22:50:29 +0400 |
commit | 0519ad865cf84bb64e5819c68510909df73cb4c4 (patch) | |
tree | fdd02288b6b039b82e7be41d012f9e897db8aaaa | |
parent | d87712eecb049ed47fbd3a5aa1da505ebcd11a2f (diff) |
Fix relocate script properly
-rwxr-xr-x | scripts/relocate.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/relocate.sh b/scripts/relocate.sh index 39e5d7bc8..b7483f296 100755 --- a/scripts/relocate.sh +++ b/scripts/relocate.sh @@ -9,12 +9,12 @@ # bash /path/to/npm/scripts/relocate.sh $nodepath # If $nodepath is blank, then it'll use /usr/bin/env -dir="$(dirname "$0")" +dir="$(dirname "$(dirname "$0")")" cli="$dir"/bin/npm-cli.js tmp="$cli".tmp node="$1" -if [ -n "$node" ]; then +if [ "x$node" = "x" ]; then node="/usr/bin/env node" fi node="#!$node" @@ -23,3 +23,4 @@ sed -e 1d "$cli" > "$tmp" echo "$node" > "$cli" cat "$tmp" >> "$cli" rm "$tmp" +chmod ogu+x $cli |