update urls
This commit is contained in:
parent
bacd1a4537
commit
b0b829fd91
20
README.md
20
README.md
|
@ -1,4 +1,5 @@
|
||||||
# Easy Install node.js
|
# Easy Install node.js
|
||||||
|
|
||||||
| Sponsored by [Daplie](https://daplie.com) |
|
| Sponsored by [Daplie](https://daplie.com) |
|
||||||
|
|
||||||
Automated node.js installers for OS X and Ubuntu
|
Automated node.js installers for OS X and Ubuntu
|
||||||
|
@ -7,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/install-min-node | bash
|
curl -fsSL 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/install-min-node -O - | bash
|
wget -nv bit.ly/node-installer -O - | bash -s --no-dev-deps
|
||||||
```
|
```
|
||||||
|
|
||||||
**node.js + dev tools**
|
**node.js + dev tools**
|
||||||
|
@ -18,10 +19,13 @@ wget -nv bit.ly/install-min-node -O - | bash
|
||||||
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 -L bit.ly/install-dev-node -o ./node-dev; bash ./node-dev
|
curl -fsSL 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
|
||||||
```
|
```
|
||||||
|
|
||||||
<!-- bit.ly/easy-install-node -->
|
*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>
|
||||||
|
|
||||||
## Screencast
|
## Screencast
|
||||||
|
|
||||||
|
@ -35,8 +39,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 v4.4.1 and v5.9.1
|
# latest version at time of writing are v8.9.0 and v9.0.0
|
||||||
echo "v7.9.0" > /tmp/NODEJS_VER
|
echo "v8.9.0" > /tmp/NODEJS_VER
|
||||||
```
|
```
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
@ -66,7 +70,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/install-dev-node -o /tmp/node-dev.sh; bash /tmp/node-dev.sh
|
curl -fsSL 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?)
|
||||||
|
@ -74,7 +78,7 @@ curl -fsSL bit.ly/install-dev-node -o /tmp/node-dev.sh; bash /tmp/node-dev.sh
|
||||||
### Ubuntu Linux
|
### Ubuntu Linux
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget -nv bit.ly/install-dev-node -O /tmp/node-dev.sh; bash /tmp/node-dev.sh
|
wget -nv 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
|
||||||
|
|
10
install.sh
10
install.sh
|
@ -12,7 +12,7 @@
|
||||||
# curl -fsSL https://example.com/setup-min.bash | bash
|
# curl -fsSL https://example.com/setup-min.bash | bash
|
||||||
# wget -nv https://example.com/setup-min.bash -O - | bash
|
# wget -nv https://example.com/setup-min.bash -O - | bash
|
||||||
|
|
||||||
dont_install_deps="$1"
|
deps_flag="$1"
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
#set -o pipefail
|
#set -o pipefail
|
||||||
|
@ -163,7 +163,7 @@ esac
|
||||||
# Download installers #
|
# Download installers #
|
||||||
#######################
|
#######################
|
||||||
|
|
||||||
if [ -z "$dont_install_deps" ]; then
|
if [ "--dev-deps" == "$deps_flag" ]; then
|
||||||
echo "Preparing to install node.js (and common development dependencies) for ${OS}" "${ARCH}"
|
echo "Preparing to install node.js (and common development dependencies) for ${OS}" "${ARCH}"
|
||||||
else
|
else
|
||||||
echo "Preparing to install node.js (minimal) for ${OS}" "${ARCH}"
|
echo "Preparing to install node.js (minimal) for ${OS}" "${ARCH}"
|
||||||
|
@ -184,7 +184,7 @@ if [ ! -e "/tmp/${INSTALL_FILE}" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$dont_install_deps" ]; then
|
if [ "--dev-deps" == "$deps_flag" ]; then
|
||||||
if [ ! -e "/tmp/${INSTALL_DEPS_FILE}" ]; then
|
if [ ! -e "/tmp/${INSTALL_DEPS_FILE}" ]; then
|
||||||
if [ -n "$(type -p curl)" ]; then
|
if [ -n "$(type -p curl)" ]; then
|
||||||
curl --silent -L "${BASE_URL}/${INSTALL_DEPS_FILE}" \
|
curl --silent -L "${BASE_URL}/${INSTALL_DEPS_FILE}" \
|
||||||
|
@ -205,7 +205,7 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$dont_install_deps" ]; then
|
if [ "--dev-deps" == "$deps_flag" ]; then
|
||||||
if [ ! -e "/tmp/${INSTALL_DEPS_FILE}" ]
|
if [ ! -e "/tmp/${INSTALL_DEPS_FILE}" ]
|
||||||
then
|
then
|
||||||
echo "Error Downloading Deps File"
|
echo "Error Downloading Deps File"
|
||||||
|
@ -286,7 +286,7 @@ sudo chown -R $(whoami) $node_install_path/lib/node_modules
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ -z "$dont_install_deps" ]; then
|
if [ "--dev-deps" == "$deps_flag" ]; then
|
||||||
|
|
||||||
################
|
################
|
||||||
# DEPENDENCIES #
|
# DEPENDENCIES #
|
||||||
|
|
|
@ -18,8 +18,8 @@ BASE_URL="https://git.coolaj86.com/coolaj86/node-installer.sh/raw/master"
|
||||||
# Download installers #
|
# Download installers #
|
||||||
#######################
|
#######################
|
||||||
|
|
||||||
INSTALL_FILE_REMOTE="setup.bash"
|
INSTALL_FILE_REMOTE="install.sh"
|
||||||
INSTALL_FILE="node.setup.bash"
|
INSTALL_FILE="node-installer.sh"
|
||||||
if [ ! -e "/tmp/${INSTALL_FILE}" ]
|
if [ ! -e "/tmp/${INSTALL_FILE}" ]
|
||||||
then
|
then
|
||||||
if [ -n "$(which curl)" ]; then
|
if [ -n "$(which curl)" ]; then
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Installs node.js + dependencies for both Ubuntu and OS X
|
||||||
|
|
||||||
|
#
|
||||||
|
# See https://git.colaj86.com/coolaj86/node-installer.sh
|
||||||
|
#
|
||||||
|
|
||||||
|
# curl -fsSL https://example.com/setup.bash | bash
|
||||||
|
# wget -nv https://example.com/setup.bash -O - | bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
BASE_URL="https://git.coolaj86.com/coolaj86/node-installer.sh/raw/master"
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# Download installers #
|
||||||
|
#######################
|
||||||
|
|
||||||
|
INSTALL_FILE_REMOTE="install.sh"
|
||||||
|
INSTALL_FILE="node-installer.sh"
|
||||||
|
if [ ! -e "/tmp/${INSTALL_FILE}" ]
|
||||||
|
then
|
||||||
|
if [ -n "$(which curl)" ]; then
|
||||||
|
curl --silent -L "${BASE_URL}/${INSTALL_FILE_REMOTE}" \
|
||||||
|
-o "/tmp/${INSTALL_FILE}" || echo 'error setup script: '"${BASE_URL}/${INSTALL_FILE_REMOTE}"
|
||||||
|
elif [ -n "$(which wget)" ]; then
|
||||||
|
wget --quiet "${BASE_URL}/${INSTALL_FILE_REMOTE}" \
|
||||||
|
-O "/tmp/${INSTALL_FILE}" || echo 'error setup script: '"${BASE_URL}/${INSTALL_FILE_REMOTE}"
|
||||||
|
else
|
||||||
|
echo "Found neither 'curl' nor 'wget'. Can't Continue."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e "/tmp/${INSTALL_FILE}" ]
|
||||||
|
then
|
||||||
|
echo "Error Downloading Install File"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
bash "/tmp/${INSTALL_FILE}"
|
Loading…
Reference in New Issue