node-installer.sh/setup.bash

24 lines
634 B
Bash
Raw Normal View History

2014-12-22 00:16:06 +00:00
#!/bin/bash
2017-04-07 02:05:09 +00:00
TMP_FILE='/tmp/node-installer-new.sh'
2015-01-14 09:57:45 +00:00
2017-04-07 02:05:09 +00:00
set -e
rm -rf /tmp/node-installer-new.sh
2015-01-14 09:57:45 +00:00
2017-04-07 02:05:09 +00:00
echo "Downloading and running the new installer script from https://git.daplie.com/coolaj86/node-install-script/raw/master/setup.bash"
2014-12-22 00:16:06 +00:00
2017-04-07 02:05:09 +00:00
SETUP_URL='https://git.daplie.com/coolaj86/node-install-script/raw/master/setup.bash'
2015-01-15 22:41:04 +00:00
2017-04-07 02:05:09 +00:00
if [ -n "$(which curl)" ]; then
curl --silent "$SETUP_URL" \
-o "$TMP_FILE" || echo 'error downloading newer deps script:' "$SETUP_URL"
elif [ -n "$(which wget)" ]; then
wget --quiet "$SETUP_URL" \
-O "$TMP_FILE" || echo 'error downloading newer deps script:' "$SETUP_URL"
2014-12-22 00:16:06 +00:00
fi
2017-04-07 02:05:09 +00:00
set +e
2014-12-22 00:16:06 +00:00
2017-04-07 02:05:09 +00:00
bash $TMP_FILE