From 67421abbd8227d5c8488fb14f05a1496f2ca451c Mon Sep 17 00:00:00 2001 From: Juan Gonzalez Date: Tue, 19 Dec 2017 11:11:36 +0100 Subject: [PATCH 1/3] Pull in nvm bash functions so that we can call them in install_linux.sh --- toolchains/install_linux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolchains/install_linux.sh b/toolchains/install_linux.sh index 4e0f0af..4a1c36f 100644 --- a/toolchains/install_linux.sh +++ b/toolchains/install_linux.sh @@ -32,5 +32,7 @@ CMDS=("apt-get" "curl" "sudo") check_cmds CMDS[@] exec_cmd "curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash" -exec_cmd "nvm install v6.10.1" +export NVM_DIR="/home/$USER/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +nvm install v6.12.2 exec_cmd "sudo apt-get install -y autoconf automake build-essential curl chrpath git libreadline6-dev libtool zlib1g-dev libssl-dev libpq-dev nodejs python wget libncurses5-dev" From 4d8ead3b667d116750b68ad839483433baed6a2e Mon Sep 17 00:00:00 2001 From: Juan Gonzalez Date: Tue, 19 Dec 2017 11:42:43 +0100 Subject: [PATCH 2/3] Ignore shellcheck error for sourcing nvm.sh --- toolchains/install_linux.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/toolchains/install_linux.sh b/toolchains/install_linux.sh index 4a1c36f..60482c0 100644 --- a/toolchains/install_linux.sh +++ b/toolchains/install_linux.sh @@ -33,6 +33,7 @@ check_cmds CMDS[@] exec_cmd "curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash" export NVM_DIR="/home/$USER/.nvm" +# shellcheck source=/dev/null [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm nvm install v6.12.2 exec_cmd "sudo apt-get install -y autoconf automake build-essential curl chrpath git libreadline6-dev libtool zlib1g-dev libssl-dev libpq-dev nodejs python wget libncurses5-dev" From 276086335d3fde76ba3aef562acba22cf2328225 Mon Sep 17 00:00:00 2001 From: Oliver Beddows Date: Tue, 19 Dec 2017 13:53:59 +0100 Subject: [PATCH 3/3] Apply standards --- toolchains/install_linux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchains/install_linux.sh b/toolchains/install_linux.sh index 60482c0..cdd4e71 100644 --- a/toolchains/install_linux.sh +++ b/toolchains/install_linux.sh @@ -34,6 +34,6 @@ check_cmds CMDS[@] exec_cmd "curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash" export NVM_DIR="/home/$USER/.nvm" # shellcheck source=/dev/null -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm nvm install v6.12.2 exec_cmd "sudo apt-get install -y autoconf automake build-essential curl chrpath git libreadline6-dev libtool zlib1g-dev libssl-dev libpq-dev nodejs python wget libncurses5-dev"