source: SH_SHM/trunk/setup/decompress.sh @ 329

Revision 329, 750 bytes checked in by marcus, 12 years ago (diff)

r168 | walther | 2011-02-17 17:21:44 +0100 (Do, 17 Feb 2011) | 4 lines

  • Added SHM-install.csh installation script (slightly changed).
  • Setup preparation via setup.py
  • Using gzip compression for better os support.
  • Property svn:executable set to *
Line 
1#! /bin/bash
2
3echo ""
4echo "Self Extracting Installer for Seismic Handler"
5echo ""
6
7export TMPDIR=`mktemp -d /tmp/selfextract.XXXXXX`
8
9echo "Extracting files to temporary directory ${TMPDIR}..."
10
11ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' $0`
12
13tail -n+$ARCHIVE $0 | base64 -d | tar xz -C $TMPDIR
14
15CDIR=`pwd`
16cd $TMPDIR
17python ./setup/setup.py
18
19result=$?
20
21cd $CDIR
22if [ $result -eq 0 ] ; then
23    echo "Installation successful, removing temporary directory..."
24    rm -rf $TMPDIR
25    exit 0
26else
27    echo "Installation unsuccessful, keeping temporary directory..."
28    echo ""
29    echo "You can restart installation procedure by cd'ing into"
30    echo $TMPDIR "and running ./setup/setup.py [--debug]"
31    exit 1
32fi
33
34__ARCHIVE_BELOW__
Note: See TracBrowser for help on using the repository browser.