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

Last change on this file since 37657 was 37490, checked in by davidb, 15 months ago

Changes after testing on cygwin

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