mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-11 14:51:49 +00:00
Remove 'function' to define functions
/bin/sh doesn't like it...
This commit is contained in:
parent
8839515af3
commit
6375e37cee
@ -6,7 +6,7 @@ set -e
|
|||||||
# Get's the path of the current script calling the function
|
# Get's the path of the current script calling the function
|
||||||
# !! Doesn't check for circular symlinks !!
|
# !! Doesn't check for circular symlinks !!
|
||||||
# e.g /tmp/path/to/script.sh
|
# e.g /tmp/path/to/script.sh
|
||||||
function nvm_script_path(){
|
nvm_script_path(){
|
||||||
SOURCE=$0
|
SOURCE=$0
|
||||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
@ -19,7 +19,7 @@ function nvm_script_path(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Get the directory of the current script
|
# Get the directory of the current script
|
||||||
function nvm_script_dir(){
|
nvm_script_dir(){
|
||||||
echo "$( dirname $(nvm_script_path))"
|
echo "$( dirname $(nvm_script_path))"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user