Browse Source

fix(install.sh): support windows mingw platform (#1112)

remotes/origin/use-bnz
阿豪 9 months ago committed by GitHub
parent
commit
463cc90007
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      .ci/install.sh

8
.ci/install.sh

@ -5,6 +5,10 @@ set -e @@ -5,6 +5,10 @@ set -e
RELEASE="latest"
OS="$(uname -s)"
case "${OS}" in
MINGW* | Win*) OS="Windows" ;;
esac
if [ -d "$HOME/.fnm" ]; then
INSTALL_DIR="$HOME/.fnm"
elif [ -n "$XDG_DATA_HOME" ]; then
@ -70,6 +74,9 @@ set_filename() { @@ -70,6 +74,9 @@ set_filename() {
elif [ "$OS" = "Darwin" ]; then
USE_HOMEBREW="true"
echo "Downloading fnm using Homebrew..."
elif [ "$OS" = "Windows" ] ; then
FILENAME="fnm-windows"
echo "Downloading the latest fnm binary from GitHub..."
else
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"
@ -180,6 +187,7 @@ setup_shell() { @@ -180,6 +187,7 @@ setup_shell() {
echo ' set PATH "'"$INSTALL_DIR"'" $PATH'
echo ' fnm env | source'
echo '' >>$CONF_FILE
echo '# fnm' >>$CONF_FILE
echo 'set PATH "'"$INSTALL_DIR"'" $PATH' >>$CONF_FILE
echo 'fnm env | source' >>$CONF_FILE

Loading…
Cancel
Save