Compare commits

...

10 次程式碼提交
v1.2 ... master

作者 SHA1 備註 提交日期
AJ ONeal a431978582 docs: fix typo 2022-08-19 19:05:47 +00:00
AJ ONeal 6c3fa218ba docs: update deprecation notice 2022-08-19 19:05:19 +00:00
AJ ONeal 79d4d239ad bugfix: don't block macOS 11+ 2021-09-08 03:20:15 +00:00
AJ ONeal 60f206373c Update 'install.sh' 2021-09-04 21:14:30 +00:00
AJ ONeal 22c741817c point to webinstall.dev 2020-04-28 02:32:35 +00:00
AJ ONeal 1f3a195fe9 update link 2019-04-09 03:48:40 +00:00
AJ ONeal c3890ca8a9 silence stupid errors 2019-04-04 06:07:54 +00:00
AJ ONeal 689fa58531 silence unimportant errors 2019-04-04 06:05:25 +00:00
AJ ONeal 895dcd31f2 NODE_VERSION taks preference over NODEJS_VER 2018-09-14 06:49:59 +00:00
AJ ONeal b8acbae85f fix unbound var 2018-09-14 06:46:56 +00:00
共有 3 個文件被更改,包括 51 次插入36 次删除

查看文件

@ -1,6 +1,16 @@
# STOP
The install method in this repo still has its place, but this is no longer maintained.
**Update**: Use [Webi](https://webinstall.dev) instead:
```sh
curl https://webinstall.dev/node | bash
```
# Easy Install node.js
| Sponsored by [ppl](https://ppl.family) |
| A [Root](https://rootprojects.org) Project |
Simple node.js installer for macOS and Linux

查看文件

@ -56,37 +56,38 @@ if [ "$(uname | grep -i 'Darwin')" ]; then
exit 1
fi
if [ "$OSX_MAJOR" -gt 10 ]; then
echo "unsupported OS X version (os 11+)"
exit 1
# Mavericks+ works for all current macOS versions
OS='mavericks'
if [[ "$OSX_MAJOR" -eq 10 ]]; then
#
# Minor
#
if [ "$OSX_MINOR" -le 5 ]; then
echo "unsupported OS X version (os 10.5-)"
exit 1
fi
# Snow
if [ "$OSX_MINOR" -eq 6 ]; then
OS='snow'
fi
# Lion
if [ $OSX_MINOR -eq 7 ]; then
OS='lion'
fi
# Mountain Lion
if [ "$OSX_MINOR" -eq 8 ]; then
OS='mountain'
fi
fi
#
# Minor
#
if [ "$OSX_MINOR" -le 5 ]; then
echo "unsupported OS X version (os 10.5-)"
exit 1
fi
# OS X (10) and macOS (11) should be supported
# Snow
if [ "$OSX_MINOR" -eq 6 ]; then
OS='snow'
fi
# Lion
if [ $OSX_MINOR -eq 7 ]; then
OS='lion'
fi
# Mountain Lion
if [ "$OSX_MINOR" -eq 8 ]; then
OS='mountain'
fi
# Mavericks, Yosemite
if [ "$OSX_MINOR" -ge 9 ]; then
OS='mavericks'
if [ "$OSX_MAJOR" -gt 11 ]; then
echo "WARNING: macOS 12+ may or may not be supported"
fi
if [ -n "$(sysctl hw | grep 64bit | grep ': 1')" ]; then
@ -232,7 +233,11 @@ fi
#########################
NODE_VERSION=${NODE_VERSION:-}
NODEJS_VER=${NODE_VERSION:-$NODEJS_VER}
NODEJS_VER=${NODEJS_VER:-}
if [ -n "$NODE_VERSION" ]; then
NODEJS_VER=$NODE_VERSION
fi
if [ -z "${NODEJS_VER:-}" ]; then
# For backwards compat
if [ -f "$my_tmp/NODEJS_VER" ]; then
@ -316,8 +321,8 @@ if [ -n "${NODEJS_VER}" ]; then
bash "$my_tmp/${INSTALL_FILE}" "${NODEJS_VER}"
fi
mkdir -p $node_install_path/lib/node_modules || $sudo_cmd mkdir -p $node_install_path/lib/node_modules
chown -R $(whoami) $node_install_path/lib/node_modules || $sudo_cmd chown -R $(whoami) $node_install_path/lib/node_modules
mkdir -p $node_install_path/lib/node_modules 2> /dev/null || $sudo_cmd mkdir -p $node_install_path/lib/node_modules
chown -R $(whoami) $node_install_path/lib/node_modules 2> /dev/null || $sudo_cmd chown -R $(whoami) $node_install_path/lib/node_modules
echo ""

查看文件

@ -73,15 +73,15 @@ if [ -n "${NODEJS_VER}" ]; then
rm ${NODEJS_UNTAR}/{LICENSE,CHANGELOG.md,README.md}
if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
echo $sudo_cmd rsync -Krl "${NODEJS_UNTAR}/" "$node_install_path/"
rsync -Krl "${NODEJS_UNTAR}/" "$node_install_path/" || $sudo_cmd rsync -Krl "${NODEJS_UNTAR}/" "$node_install_path/"
rsync -Krl "${NODEJS_UNTAR}/" "$node_install_path/" 2>/dev/null || $sudo_cmd rsync -Krl "${NODEJS_UNTAR}/" "$node_install_path/"
else
# due to symlink issues on Arch Linux, don't copy the share directory
rm -rf ${NODEJS_UNTAR}/share
echo $sudo_cmd cp -Hr "${NODEJS_UNTAR}/*" "$node_install_path/"
cp -Hr "${NODEJS_UNTAR}"/* "$node_install_path/" || $sudo_cmd cp -Hr "${NODEJS_UNTAR}"/* "$node_install_path/"
cp -Hr "${NODEJS_UNTAR}"/* "$node_install_path/" 2>/dev/null || $sudo_cmd cp -Hr "${NODEJS_UNTAR}"/* "$node_install_path/"
fi
rm -rf "${NODEJS_UNTAR}"
chown -R $(whoami) "$node_install_path/lib/node_modules/" || $sudo_cmd chown -R $(whoami) "$node_install_path/lib/node_modules/"
chown $(whoami) ""$node_install_path"/bin/" || $sudo_cmd chown $(whoami) ""$node_install_path"/bin/"
chown -R $(whoami) "$node_install_path/lib/node_modules/" 2>/dev/null || $sudo_cmd chown -R $(whoami) "$node_install_path/lib/node_modules/"
chown $(whoami) ""$node_install_path"/bin/" 2>/dev/null || $sudo_cmd chown $(whoami) ""$node_install_path"/bin/"
fi