Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
AJ ONeal | a431978582 | |
AJ ONeal | 6c3fa218ba | |
AJ ONeal | 79d4d239ad | |
AJ ONeal | 60f206373c | |
AJ ONeal | 22c741817c | |
AJ ONeal | 1f3a195fe9 | |
AJ ONeal | c3890ca8a9 | |
AJ ONeal | 689fa58531 | |
AJ ONeal | 895dcd31f2 | |
AJ ONeal | b8acbae85f |
12
README.md
12
README.md
|
@ -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
|
# Easy Install node.js
|
||||||
|
|
||||||
| Sponsored by [ppl](https://ppl.family) |
|
| A [Root](https://rootprojects.org) Project |
|
||||||
|
|
||||||
Simple node.js installer for macOS and Linux
|
Simple node.js installer for macOS and Linux
|
||||||
|
|
||||||
|
|
25
install.sh
25
install.sh
|
@ -56,11 +56,10 @@ if [ "$(uname | grep -i 'Darwin')" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$OSX_MAJOR" -gt 10 ]; then
|
# Mavericks+ works for all current macOS versions
|
||||||
echo "unsupported OS X version (os 11+)"
|
OS='mavericks'
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
if [[ "$OSX_MAJOR" -eq 10 ]]; then
|
||||||
#
|
#
|
||||||
# Minor
|
# Minor
|
||||||
#
|
#
|
||||||
|
@ -83,10 +82,12 @@ if [ "$(uname | grep -i 'Darwin')" ]; then
|
||||||
if [ "$OSX_MINOR" -eq 8 ]; then
|
if [ "$OSX_MINOR" -eq 8 ]; then
|
||||||
OS='mountain'
|
OS='mountain'
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Mavericks, Yosemite
|
# OS X (10) and macOS (11) should be supported
|
||||||
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
|
fi
|
||||||
|
|
||||||
if [ -n "$(sysctl hw | grep 64bit | grep ': 1')" ]; then
|
if [ -n "$(sysctl hw | grep 64bit | grep ': 1')" ]; then
|
||||||
|
@ -232,7 +233,11 @@ fi
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
NODE_VERSION=${NODE_VERSION:-}
|
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
|
if [ -z "${NODEJS_VER:-}" ]; then
|
||||||
# For backwards compat
|
# For backwards compat
|
||||||
if [ -f "$my_tmp/NODEJS_VER" ]; then
|
if [ -f "$my_tmp/NODEJS_VER" ]; then
|
||||||
|
@ -316,8 +321,8 @@ if [ -n "${NODEJS_VER}" ]; then
|
||||||
bash "$my_tmp/${INSTALL_FILE}" "${NODEJS_VER}"
|
bash "$my_tmp/${INSTALL_FILE}" "${NODEJS_VER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $node_install_path/lib/node_modules || $sudo_cmd mkdir -p $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 || $sudo_cmd chown -R $(whoami) $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 ""
|
echo ""
|
||||||
|
|
||||||
|
|
|
@ -73,15 +73,15 @@ if [ -n "${NODEJS_VER}" ]; then
|
||||||
rm ${NODEJS_UNTAR}/{LICENSE,CHANGELOG.md,README.md}
|
rm ${NODEJS_UNTAR}/{LICENSE,CHANGELOG.md,README.md}
|
||||||
if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
|
if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
|
||||||
echo $sudo_cmd rsync -Krl "${NODEJS_UNTAR}/" "$node_install_path/"
|
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
|
else
|
||||||
# due to symlink issues on Arch Linux, don't copy the share directory
|
# due to symlink issues on Arch Linux, don't copy the share directory
|
||||||
rm -rf ${NODEJS_UNTAR}/share
|
rm -rf ${NODEJS_UNTAR}/share
|
||||||
echo $sudo_cmd cp -Hr "${NODEJS_UNTAR}/*" "$node_install_path/"
|
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
|
fi
|
||||||
rm -rf "${NODEJS_UNTAR}"
|
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 -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/" || $sudo_cmd chown $(whoami) ""$node_install_path"/bin/"
|
chown $(whoami) ""$node_install_path"/bin/" 2>/dev/null || $sudo_cmd chown $(whoami) ""$node_install_path"/bin/"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue