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
|
||||
|
||||
| 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
|
||||
|
||||
|
@ -8,10 +8,10 @@ Automated node.js installers for OS X and Ubuntu
|
|||
|
||||
```bash
|
||||
# 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)
|
||||
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**
|
||||
|
@ -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
|
||||
|
||||
```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
|
||||
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>
|
||||
|
@ -41,8 +41,8 @@ echo "Current node.js version is $(curl -fsSL https://nodejs.org/dist/index.tab
|
|||
|
||||
```bash
|
||||
# To install a specific version rather than defaulting to latest
|
||||
# latest version at time of writing are v8.9.0 and v9.0.0
|
||||
echo "v8.9.0" > /tmp/NODEJS_VER
|
||||
# latest version at time of writing are v8.11.1 and v10.1.0
|
||||
export NODEJS_VER="v10.1.0"
|
||||
```
|
||||
|
||||
### 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 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
|
||||
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
|
||||
|
||||
```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?)
|
||||
|
@ -96,7 +96,7 @@ curl -fsSL bit.ly/node-installer -o /tmp/node-installer.sh; bash /tmp/node-insta
|
|||
### Ubuntu Linux
|
||||
|
||||
```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
|
||||
|
|
12
install.sh
12
install.sh
|
@ -32,7 +32,6 @@ BASE_URL="https://git.coolaj86.com/coolaj86/node-installer.sh/raw/master"
|
|||
NO_FAIL2BAN="nope"
|
||||
OS="unsupported"
|
||||
ARCH=""
|
||||
NODEJS_VER=""
|
||||
SETUP_FILE=""
|
||||
|
||||
clear
|
||||
|
@ -226,10 +225,13 @@ fi
|
|||
# Which node.js VERSION ? #
|
||||
#########################
|
||||
|
||||
if [ -f "/tmp/NODEJS_VER" ]; then
|
||||
NODEJS_VER=$(cat /tmp/NODEJS_VER | grep v)
|
||||
elif [ -f "/tmp/IOJS_VER" ]; then
|
||||
NODEJS_VER=$(cat /tmp/IOJS_VER | grep v)
|
||||
if [ -z "${NODEJS_VER:-}" ]; then
|
||||
# For backwards compat
|
||||
if [ -f "/tmp/NODEJS_VER" ]; then
|
||||
NODEJS_VER=$(cat /tmp/NODEJS_VER | grep v)
|
||||
elif [ -f "/tmp/IOJS_VER" ]; then
|
||||
NODEJS_VER=$(cat /tmp/IOJS_VER | grep v)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$NODEJS_VER" ]; then
|
||||
|
|
Loading…
Reference in New Issue