|
|
@ -5,6 +5,10 @@ set -e |
|
|
|
RELEASE="latest" |
|
|
|
RELEASE="latest" |
|
|
|
OS="$(uname -s)" |
|
|
|
OS="$(uname -s)" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "${OS}" in |
|
|
|
|
|
|
|
MINGW* | Win*) OS="Windows" ;; |
|
|
|
|
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
if [ -d "$HOME/.fnm" ]; then |
|
|
|
if [ -d "$HOME/.fnm" ]; then |
|
|
|
INSTALL_DIR="$HOME/.fnm" |
|
|
|
INSTALL_DIR="$HOME/.fnm" |
|
|
|
elif [ -n "$XDG_DATA_HOME" ]; then |
|
|
|
elif [ -n "$XDG_DATA_HOME" ]; then |
|
|
@ -70,6 +74,9 @@ set_filename() { |
|
|
|
elif [ "$OS" = "Darwin" ]; then |
|
|
|
elif [ "$OS" = "Darwin" ]; then |
|
|
|
USE_HOMEBREW="true" |
|
|
|
USE_HOMEBREW="true" |
|
|
|
echo "Downloading fnm using Homebrew..." |
|
|
|
echo "Downloading fnm using Homebrew..." |
|
|
|
|
|
|
|
elif [ "$OS" = "Windows" ] ; then |
|
|
|
|
|
|
|
FILENAME="fnm-windows" |
|
|
|
|
|
|
|
echo "Downloading the latest fnm binary from GitHub..." |
|
|
|
else |
|
|
|
else |
|
|
|
echo "OS $OS is not supported." |
|
|
|
echo "OS $OS is not supported." |
|
|
|
echo "If you think that's a bug - please file an issue to https://github.com/Schniz/fnm/issues" |
|
|
|
echo "If you think that's a bug - please file an issue to https://github.com/Schniz/fnm/issues" |
|
|
@ -180,6 +187,7 @@ setup_shell() { |
|
|
|
echo ' set PATH "'"$INSTALL_DIR"'" $PATH' |
|
|
|
echo ' set PATH "'"$INSTALL_DIR"'" $PATH' |
|
|
|
echo ' fnm env | source' |
|
|
|
echo ' fnm env | source' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo '' >>$CONF_FILE |
|
|
|
echo '# fnm' >>$CONF_FILE |
|
|
|
echo '# fnm' >>$CONF_FILE |
|
|
|
echo 'set PATH "'"$INSTALL_DIR"'" $PATH' >>$CONF_FILE |
|
|
|
echo 'set PATH "'"$INSTALL_DIR"'" $PATH' >>$CONF_FILE |
|
|
|
echo 'fnm env | source' >>$CONF_FILE |
|
|
|
echo 'fnm env | source' >>$CONF_FILE |
|
|
|