From 5d9bd8f381204247d1c5056cc64357c4c178ecb1 Mon Sep 17 00:00:00 2001 From: silvernode Date: Wed, 13 Jul 2016 01:52:09 -0700 Subject: [PATCH] [Fixed] julia-installer: Output directory name incorrect --- julia-installer.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/julia-installer.sh b/julia-installer.sh index 8e2b5d3..9fa06be 100755 --- a/julia-installer.sh +++ b/julia-installer.sh @@ -3,6 +3,7 @@ VERSION="0.4.6" DOWN_DIR="/tmp" VPATH="0.4" +OUTNAME="julia-${VERSION}" ARC=$(getconf LONG_BIT) PACKAGE64="julia-${VERSION}-linux-x86_64.tar.gz" PACKAGE32="julia-${VERSION}-linux-i686.tar.gz" @@ -27,24 +28,26 @@ downLoad() extrPack() { if [ -f ${DOWN_DIR}/${PACKAGE64} ];then - tar xvzf ${DOWN_DIR}/${PACKAGE64} -C ${DOWN_DIR} + mkdir ${DOWN_DIR}/${OUTNAME} + tar xvzf ${DOWN_DIR}/${PACKAGE64} -C ${DOWN_DIR}/${OUTNAME} --strip-components=1 elif [ -f ${DOWN_DIR}/${PACKAGE32} ];then - tar xvzf ${DOWN_DIR}/${PACKAGE32} - C ${DOWN_DIR} + mkdir ${DOWN_DIR}/${OUTNAME} + tar xvzf ${DOWN_DIR}/${PACKAGE32} - C ${DOWN_DIR}/${OUTNAME} --strip-components=1 fi } installJulia() { - cd ${DOWN_DIR}/julia-79599ada44 + cd ${DOWN_DIR}/${OUTNAME} cp -v -R bin/* /usr/bin/ cp -v -R etc/* /etc/ echo "hi" cp -v -R include/* /include/ cp -v -R lib/* /lib cp -v -R share/* /usr/share - cd ${DOWN_DIR}/julia-79599ada44 + cd ${DOWN_DIR}/${OUTNAME} cp -v -R bin/* /usr/bin/ cp -v -R etc/* /etc/ cp -v -R include/* /include/