diff packaging/linux-createpackage.sh.in @ 700:bf87feccb26c

Write installation configuration file.
author Sascha Wilde <wilde@intevation.de>
date Wed, 02 Jul 2014 10:53:43 +0200
parents a5a709c6ce93
children acbe75423283
line wrap: on
line diff
--- a/packaging/linux-createpackage.sh.in	Tue Jul 01 17:22:31 2014 +0200
+++ b/packaging/linux-createpackage.sh.in	Wed Jul 02 10:53:43 2014 +0200
@@ -7,6 +7,7 @@
 # See LICENSE.txt for details.
 
 TMPDIR=$(mktemp -d)
+TMPSHAR=$(mktemp "@CMAKE_BINARY_DIR@/shar.XXXXXXXXXX")
 
 INSTALLER="@CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.sh"
 
@@ -21,10 +22,12 @@
 install "${EXEFILES[@]}" "$TMPDIR/bin" 
 
 echo "Building $INSTALLER..."
-cat "@CMAKE_BINARY_DIR@/packaging/linux-installer.inc" >"$INSTALLER"
+cp "@CMAKE_BINARY_DIR@/packaging/linux-installer.inc" "$INSTALLER"
 cd "$TMPDIR"
-shar -z -B bin/* >>"$INSTALLER"
+shar -z -B bin/* | sed 's/^exit 0//' >>"$TMPSHAR"
+sed -i "/###SHAR###/r $TMPSHAR" "$INSTALLER"
 chmod +x "$INSTALLER"
 
 echo "Cleaning up..."
 rm -r "$TMPDIR"
+rm  "$TMPSHAR"

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