From: Youness Alaoui Date: Thu, 14 Jan 2016 21:39:55 +0000 (-0500) Subject: Allow use of 7za on linux for package.sh X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ec73c3cd42138e73ef92a34e9b596a69510be5c6;p=cura.git Allow use of 7za on linux for package.sh --- diff --git a/package.sh b/package.sh index c1403caa..50330ac3 100755 --- a/package.sh +++ b/package.sh @@ -75,7 +75,7 @@ function extract { echo "Extracting $*" echo "7z x -y $*" >> log.txt - 7z x -y $* >> log.txt + $EXTRACT x -y $* >> log.txt if [ $? != 0 ]; then echo "Failed to extract $*" exit 1 @@ -118,6 +118,12 @@ else MAKE=make fi +if [ -z `which 7za` ]; then + EXTRACT=7z +else + EXTRACT=7za +fi + # Change working directory to the directory the script is in # http://stackoverflow.com/a/246128 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -128,7 +134,7 @@ checkTool curl "curl: http://curl.haxx.se/" if [ $BUILD_TARGET = "win32" ]; then checkTool avr-gcc "avr-gcc: http://winavr.sourceforge.net/ " #Check if we have 7zip, needed to extract and packup a bunch of packages for windows. - checkTool 7z "7zip: http://www.7-zip.org/" + checkTool $EXTRACT "7zip: http://www.7-zip.org/" checkTool $MAKE "mingw: http://www.mingw.org/" fi #For building under MacOS we need gnutar instead of tar