Compare commits
5 Commits
3adefcc4a8
...
5af26c6c86
Author | SHA1 | Date |
---|---|---|
AJ ONeal | 5af26c6c86 | |
AJ ONeal | a9e1370b58 | |
AJ ONeal | 1edc07515f | |
AJ ONeal | 1a7d21b850 | |
AJ ONeal | 7809937d74 |
20
README.md
20
README.md
|
@ -1,6 +1,6 @@
|
||||||
# Easy Install node.js
|
# Easy Install node.js
|
||||||
|
|
||||||
| Sponsored by [ppl](https://ppl.family) and [Daplie](https://dapliefounder.com).
|
| Sponsored by [ppl](https://ppl.family) |
|
||||||
|
|
||||||
Automated node.js installers for OS X and Ubuntu
|
Automated node.js installers for OS X and Ubuntu
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@ Automated node.js installers for OS X and Ubuntu
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# install node.js without development dependencies
|
# install node.js without development dependencies
|
||||||
curl -fsSL bit.ly/node-installer | bash -s -- --no-dev-deps
|
curl -fsSL https://bit.ly/node-installer | bash -s -- --no-dev-deps
|
||||||
|
|
||||||
# using wget instead of curl (Ubuntu)
|
# using wget instead of curl (Ubuntu)
|
||||||
wget -nv bit.ly/node-installer -O - | bash -s -- --no-dev-deps
|
wget -nv https://bit.ly/node-installer -O - | bash -s -- --no-dev-deps
|
||||||
```
|
```
|
||||||
|
|
||||||
**node.js + dev tools**
|
**node.js + dev tools**
|
||||||
|
@ -19,10 +19,10 @@ wget -nv bit.ly/node-installer -O - | bash -s -- --no-dev-deps
|
||||||
Install node.js and basic development tools - git, node, gcc, pkg-config, etc
|
Install node.js and basic development tools - git, node, gcc, pkg-config, etc
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fsSL bit.ly/node-installer -o ./node-installer.sh; bash ./node-installer.sh --dev-deps
|
curl -fsSL https://bit.ly/node-installer -o ./node-installer.sh; bash ./node-installer.sh --dev-deps
|
||||||
|
|
||||||
# or wget
|
# or wget
|
||||||
wget -nv bit.ly/node-installer -O - ./node-installer.sh; bash ./node-installer.sh --dev-deps
|
wget -nv https://bit.ly/node-installer -O - ./node-installer.sh; bash ./node-installer.sh --dev-deps
|
||||||
```
|
```
|
||||||
|
|
||||||
*Note*: [bit.ly/node-installer](https://bit.ly/node-installer) simple redirects to <https://git.coolaj86.com/coolaj86/node-installer.sh/raw/master/install.sh>
|
*Note*: [bit.ly/node-installer](https://bit.ly/node-installer) simple redirects to <https://git.coolaj86.com/coolaj86/node-installer.sh/raw/master/install.sh>
|
||||||
|
@ -41,8 +41,8 @@ echo "Current node.js version is $(curl -fsSL https://nodejs.org/dist/index.tab
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# To install a specific version rather than defaulting to latest
|
# To install a specific version rather than defaulting to latest
|
||||||
# latest version at time of writing are v8.9.0 and v9.0.0
|
# latest version at time of writing are v8.11.1 and v10.1.0
|
||||||
echo "v8.9.0" > /tmp/NODEJS_VER
|
export NODEJS_VER="v10.1.0"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Choosing an install location
|
### Choosing an install location
|
||||||
|
@ -55,7 +55,7 @@ The install path will be the preceding `lib/node_modules`
|
||||||
export NPM_CONFIG_PREFIX=/tmp/user/local
|
export NPM_CONFIG_PREFIX=/tmp/user/local
|
||||||
export NODE_PATH=/tmp/user/local/lib/node_modules
|
export NODE_PATH=/tmp/user/local/lib/node_modules
|
||||||
|
|
||||||
curl -fsSL bit.ly/node-installer -o ./node-installer.sh; bash ./node-installer.sh --dev-deps
|
curl -fsSL https://bit.ly/node-installer -o ./node-installer.sh; bash ./node-installer.sh --dev-deps
|
||||||
|
|
||||||
# If you want to add the install location to your PATH
|
# If you want to add the install location to your PATH
|
||||||
PATH=$PATH:/tmp/user/local/bin
|
PATH=$PATH:/tmp/user/local/bin
|
||||||
|
@ -88,7 +88,7 @@ Type `agree` and hit enter to accept the license.
|
||||||
Now you can install node.js
|
Now you can install node.js
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fsSL bit.ly/node-installer -o /tmp/node-installer.sh; bash /tmp/node-installer.sh --dev-deps
|
curl -fsSL https://bit.ly/node-installer -o /tmp/node-installer.sh; bash /tmp/node-installer.sh --dev-deps
|
||||||
```
|
```
|
||||||
|
|
||||||
*TODO*: Make it easier to accepting the license (automatic?)
|
*TODO*: Make it easier to accepting the license (automatic?)
|
||||||
|
@ -96,7 +96,7 @@ curl -fsSL bit.ly/node-installer -o /tmp/node-installer.sh; bash /tmp/node-insta
|
||||||
### Ubuntu Linux
|
### Ubuntu Linux
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget -nv bit.ly/node-installer -O /tmp/node-installer.sh; bash /tmp/node-installer.sh --dev-deps
|
wget -nv https://bit.ly/node-installer -O /tmp/node-installer.sh; bash /tmp/node-installer.sh --dev-deps
|
||||||
```
|
```
|
||||||
|
|
||||||
### Other things you should know
|
### Other things you should know
|
||||||
|
|
|
@ -32,7 +32,6 @@ BASE_URL="https://git.coolaj86.com/coolaj86/node-installer.sh/raw/master"
|
||||||
NO_FAIL2BAN="nope"
|
NO_FAIL2BAN="nope"
|
||||||
OS="unsupported"
|
OS="unsupported"
|
||||||
ARCH=""
|
ARCH=""
|
||||||
NODEJS_VER=""
|
|
||||||
SETUP_FILE=""
|
SETUP_FILE=""
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
@ -226,11 +225,14 @@ fi
|
||||||
# Which node.js VERSION ? #
|
# Which node.js VERSION ? #
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
|
if [ -z "${NODEJS_VER:-}" ]; then
|
||||||
|
# For backwards compat
|
||||||
if [ -f "/tmp/NODEJS_VER" ]; then
|
if [ -f "/tmp/NODEJS_VER" ]; then
|
||||||
NODEJS_VER=$(cat /tmp/NODEJS_VER | grep v)
|
NODEJS_VER=$(cat /tmp/NODEJS_VER | grep v)
|
||||||
elif [ -f "/tmp/IOJS_VER" ]; then
|
elif [ -f "/tmp/IOJS_VER" ]; then
|
||||||
NODEJS_VER=$(cat /tmp/IOJS_VER | grep v)
|
NODEJS_VER=$(cat /tmp/IOJS_VER | grep v)
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$NODEJS_VER" ]; then
|
if [ -n "$NODEJS_VER" ]; then
|
||||||
NODEJS_VERT=$(echo ${NODEJS_VER} | cut -c 2- | cut -d '.' -f1)
|
NODEJS_VERT=$(echo ${NODEJS_VER} | cut -c 2- | cut -d '.' -f1)
|
||||||
|
|
Loading…
Reference in New Issue