source: gs3-extensions/selfcontained-nodejs/trunk/SETUP.sh@ 36447

Last change on this file since 36447 was 36447, checked in by davidb, 20 months ago

Scripts in line with other selfcontained cli extensions

File size: 762 bytes
Line 
1
2OS_UPPERCAPS=`uname -s | tr '[:lower:]' '[:upper:]'`
3OS_LOWERCAPS=`uname -s | tr '[:upper:]' '[:lower:]'`
4
5package_name="NodeJS"
6installed_dir=node-${OS_LOWERCAPS}-64bit
7
8full_installed_dir="$PWD/$installed_dir"
9
10if test ! -d "$full_installed_dir" ; then
11 echo "" >&2
12 echo "In seting up $package_name, did not find directory:" >&2
13 echo " $full_installed_dir" >&2
14 echo "" >&2
15 echo "Have you run ./PREPARE-${OS_ALLCAPS}.sh?" >&2
16 echo "Exiting..." >&2
17 echo "" >&2
18 return
19fi
20
21NODE_HOME="$full_installed_dir" ; export NODE_HOME
22NODE_PATH=$full_installed_dir/lib/node_modules ; export NODE_PATH
23PATH="$NODE_HOME/bin:$PATH" ; export PATH
24
25echo + "Set NODE_HOME, NODE_PATH and updated PATH"
Note: See TracBrowser for help on using the repository browser.