forked from coolaj86/node-installer.sh
use env var for NODEJS_VER, update version
This commit is contained in:
parent
3adefcc4a8
commit
7809937d74
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
|
11
install.sh
11
install.sh
|
@ -226,10 +226,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