Browse Source

Make fw_untar and fw_unzip clean up the compressed files

Hamilton Turner 11 years ago
parent
commit
01e7c045ae

+ 9 - 1
toolset/setup/linux/bash_functions.sh

@@ -14,10 +14,18 @@ fw_get () {
 fw_untar() {
   echo "Running 'tar xf $@'...please wait"
   tar xf "$@"
+  echo "Removing compressed tar file"
+  
+  # use -f to avoid printing errors if they gave additional arguments
+  rm -f "$@"
 }
 
 fw_unzip() {
-  unzip "$@"
+  echo "Running 'unzip $@'...please wait"
+  unzip -o -q "$@"
+  echo "Removing compressed zip file"
+  # use -f to avoid printing errors if they gave additional arguments
+  rm -f "$@"
 }
 
 # Was there an error for the current dependency?

+ 2 - 2
toolset/setup/linux/frameworks/grails.sh

@@ -3,5 +3,5 @@
 RETCODE=$(fw_exists grails-2.4.2)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
-fw_get http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.4.2.zip
-unzip -o grails-2.4.2.zip
+fw_get http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.4.2.zip -O grails-2.4.2.zip
+fw_unzip grails-2.4.2.zip

+ 2 - 2
toolset/setup/linux/frameworks/play2.sh

@@ -3,5 +3,5 @@
 RETCODE=$(fw_exists play-2.2.0)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
-fw_get http://downloads.typesafe.com/play/2.2.0/play-2.2.0.zip
-fw_unzip play-2.2.0.zip
+fw_get http://downloads.typesafe.com/play/2.2.0/play-2.2.0.zip -O play-2.2.0.zip
+fw_unzip play-2.2.0.zip

+ 2 - 3
toolset/setup/linux/frameworks/treefrog.sh

@@ -5,9 +5,8 @@ RETCODE=$(fw_exists treefrog-1.7.7)
 
 sudo apt-get install -y qt4-qmake libqt4-dev libqt4-sql-mysql libqt4-sql-psql g++
 
-fw_get http://downloads.sourceforge.net/project/treefrog/src/treefrog-1.7.7.tar.gz
+fw_get http://downloads.sourceforge.net/project/treefrog/src/treefrog-1.7.7.tar.gz -O treefrog-1.7.7.tar.gz
 fw_untar treefrog-1.7.7.tar.gz
-rm -f treefrog-1.7.7.tar.gz
 cd treefrog-1.7.7
 ./configure
 
@@ -17,4 +16,4 @@ sudo make install
 
 cd ../tools
 make -j4
-sudo make install
+sudo make install

+ 0 - 1
toolset/setup/linux/frameworks/wt.sh

@@ -10,7 +10,6 @@ sudo apt-get -y install libboost1.54-all-dev
 
 fw_get http://downloads.sourceforge.net/witty/wt-3.3.3.tar.gz -O wt.tar.gz
 fw_untar wt.tar.gz
-rm wt.tar.gz
 
 mv wt-* wt
 cd wt

+ 1 - 1
toolset/setup/linux/languages/pypy.sh

@@ -4,7 +4,7 @@ RETCODE=$(fw_exists pypy)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
 fw_get https://bitbucket.org/pypy/pypy/downloads/pypy-2.3.1-linux64.tar.bz2 -O pypy-2.3.1-linux64.tar.bz2
-tar vxf pypy-2.3.1-linux64.tar.bz2
+fw_untar pypy-2.3.1-linux64.tar.bz2
 ln -sf pypy-2.3.1-linux64 pypy
 
 fw_get https://bootstrap.pypa.io/get-pip.py

+ 1 - 1
toolset/setup/linux/languages/python2.sh

@@ -4,7 +4,7 @@ RETCODE=$(fw_exists py2)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
 fw_get http://www.python.org/ftp/python/2.7.7/Python-2.7.7.tgz
-tar vxf Python-2.7.7.tgz
+fw_untar Python-2.7.7.tgz
 pre=$(pwd)
 cd Python-2.7.7
 ./configure --prefix=${pre}/py2 --disable-shared

+ 1 - 1
toolset/setup/linux/languages/python3.sh

@@ -4,7 +4,7 @@ RETCODE=$(fw_exists py3)
 [ ! "$RETCODE" == 0 ] || { return 0; }
 
 fw_get http://www.python.org/ftp/python/3.4.1/Python-3.4.1.tar.xz
-tar vxf Python-3.4.1.tar.xz
+fw_untar Python-3.4.1.tar.xz
 pre=$(pwd)
 cd Python-3.4.1
 ./configure --prefix=${pre}/py3 --disable-shared