From 6c0afe64889b624f422bd88476cc3ebe9d0b816d Mon Sep 17 00:00:00 2001 From: richdex14 Date: Sun, 3 Sep 2017 21:13:47 -0600 Subject: [PATCH] Update setup-node-ubuntu.bash to use portable copy method as opposed to non-portable `tar --strip-components` in unpacking step. --- setup-node-ubuntu.bash | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup-node-ubuntu.bash b/setup-node-ubuntu.bash index 9c44226..ce63778 100644 --- a/setup-node-ubuntu.bash +++ b/setup-node-ubuntu.bash @@ -59,11 +59,14 @@ if [ -n "${NODEJS_VER}" ]; then fi mkdir -p ${NODEJS_UNTAR}/ - tar xf ${NODEJS_LOCAL} -C ${NODEJS_UNTAR}/ --strip-components=1 - rm ${NODEJS_UNTAR}/{LICENSE,CHANGELOG.md,README.md} + # --strip-components isn't portable, switch to portable version by performing move step after untar + tar xf ${NODEJS_LOCAL} -C ${NODEJS_UNTAR}/ #--strip-components=1 + mv ${NODEJS_UNTAR}/${NODEJS_NAME}-${NODEJS_VER}-linux-${ARCH}/* ${NODEJS_UNTAR}/ + rm -rf ${NODEJS_UNTAR}/${NODEJS_NAME}-${NODEJS_VER}-linux-${ARCH} # clean up the temporary unzip folder + rm ${NODEJS_UNTAR}/{LICENSE,CHANGELOG.md,README.md} sudo rsync -a "${NODEJS_UNTAR}/" "$node_install_path/" sudo chown -R $(whoami) "$node_install_path/lib/node_modules/" sudo chown $(whoami) ""$node_install_path"/bin/" -fi +fi \ No newline at end of file