source: gs3-extensions/selfcontained-nodejs/trunk/PREPARE-LINUX.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

  • Property svn:executable set to *
File size: 828 bytes
Line 
1#!/bin/bash
2
3OS_UPPERCAPS=`uname -s | tr '[:lower:]' '[:upper:]'`
4OS_LOWERCAPS=`uname -s | tr '[:upper:]' '[:lower:]'`
5
6version=16.13.2
7installed_dir=node-${OS_LOWERCAPS}-64bit
8
9tar xvzf node-v${version}-linux-x64.tar.gz \
10 && mv node-v${version}-linux-x64 $installed_dir
11
12if [ $? = 0 ] ; then
13 echo "Untarred NodeJS $version and renamed the directory to:"
14 echo " $installed_dir"
15fi
16
17
18os_full_lc=`uname -s | tr '[:upper:]' '[:lower:]'`
19os_root=${os_full_lc%%_*}
20
21if [ "x$os_root" = "xcygwin" ] ; then
22 if [ ! -x $installed_dir/node.exe ] ; then
23 echo "" >&2
24 echo "**** Note ****" >&2
25 echo "Under Cygwin, the programs in the 'bin' directory often lack" >&2
26 echo "execute permissions. This can be addressed with:" >&2
27 echo " chmod a+x $installed_dir/*.{exe,bat,cmd} $installed_dir/{npm,npx}" >&2
28 fi
29fi
Note: See TracBrowser for help on using the repository browser.