12 lines
300 B
Bash
Executable file
12 lines
300 B
Bash
Executable file
#!/bin/zsh
|
|
#dep:node
|
|
local SELF=$(realpath "$0")
|
|
source ${$(realpath "$0"):h:h}/lib/next-in-path.zsh
|
|
export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
|
|
NEXT=$(next-in-path node $0)
|
|
if (( $? != 0 )); then exit 1; fi
|
|
if [[ $NEXT == $SELF ]]; then
|
|
exec /usr/bin/node $@
|
|
else
|
|
exec $NEXT $@
|
|
fi
|