annotate packaging/linux-installer.inc.in @ 680:a5a709c6ce93

Added minimal shar based installer for linux.
author Sascha Wilde <wilde@intevation.de>
date Mon, 30 Jun 2014 18:33:26 +0200
parents
children 578860edde53
rev   line source
680
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
1 #!/bin/bash
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
2
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
3 PREFIX=/usr/local
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
4
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
5 fatal()
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
6 {
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
7 echo "$1" >&2
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
8 echo "Installation failed." >&2
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
9 exit 1
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
10 }
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
11
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
12 cat <<EOF
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
13 ------------------------------------------------------------------------
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
14
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
15 TrustBridge - Installer
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
16 Version @PROJECT_VERSION@
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
17
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
18 ------------------------------------------------------------------------
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
19 EOF
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
20
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
21 echo -n "Select installation prefix for TrustBridge [${PREFIX}]: "
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
22 read -e path
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
23
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
24 echo "Installing to '$path':"
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
25
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
26 if [ ! -d "$path" ] ; then
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
27 echo "creating installation directory ..."
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
28 install -d "$path" || fatal "Could not create '$path'!"
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
29 fi
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
30
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
31 echo "unpacking files ..."
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
32 cd "$path"
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
33
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
34 # ----------------------------------------------------------------------
a5a709c6ce93 Added minimal shar based installer for linux.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
35 # regular shar archive appended here:

http://wald.intevation.org/projects/trustbridge/