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

Revision 337, 1.0 KB checked in by marcus, 12 years ago (diff)

r176 | walther | 2011-03-02 17:58:58 +0100 (Mi, 02 Mär 2011) | 2 lines

Added installation "warning".

  • Property svn:executable set to *
Line 
1#! /bin/bash
2
3echo ""
4echo "Self Extracting Installer for Seismic Handler"
5echo ""
6
7echo "Please read and execute all installation instructions for your"
8echo "operating system as explained at the Seismic Handler project website:"
9echo "http://www.seismic-handler.org/portal/wiki/ShmSeismicHandler"
10echo ""
11read -p "Did you execute all neccessary steps (type 'yes')? " yes
12[ "$yes" = "yes" ] || exit
13
14export TMPDIR=`mktemp -d /tmp/selfextract.XXXXXX`
15
16echo "Extracting files to temporary directory ${TMPDIR}..."
17
18ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' $0`
19
20tail -n+$ARCHIVE $0 | base64 -d | tar xz -C $TMPDIR
21
22CDIR=`pwd`
23cd $TMPDIR
24python ./setup/setup.py
25
26result=$?
27
28cd $CDIR
29if [ $result -eq 0 ] ; then
30    echo "Installation successful, removing temporary directory..."
31    rm -rf $TMPDIR
32    exit 0
33else
34    echo "Installation unsuccessful, keeping temporary directory..."
35    echo ""
36    echo "You can restart installation procedure by cd'ing into"
37    echo $TMPDIR "and running ./setup/setup.py [--debug]"
38    exit 1
39fi
40
41__ARCHIVE_BELOW__
Note: See TracBrowser for help on using the repository browser.