comparison packaging/linux-createpackage.sh.in @ 711:acbe75423283

Added deinstallation functionality.
author Sascha Wilde <wilde@intevation.de>
date Wed, 02 Jul 2014 15:12:25 +0200
parents bf87feccb26c
children ea8d13590cbd
comparison
equal deleted inserted replaced
710:86c9ff4cfb02 711:acbe75423283
17 17
18 # Make installation in TMPDIR, this is what we will put into the 18 # Make installation in TMPDIR, this is what we will put into the
19 # shar-archive. 19 # shar-archive.
20 echo "Using $TMPDIR for temporary installation to build installer..." 20 echo "Using $TMPDIR for temporary installation to build installer..."
21 install -d "$TMPDIR/bin" 21 install -d "$TMPDIR/bin"
22 install "${EXEFILES[@]}" "$TMPDIR/bin" 22 install "${EXEFILES[@]}" "$TMPDIR/bin"
23
24 echo "Creating shar archive ..."
25 cd "$TMPDIR"
26 shar -z -B bin/* | sed 's/^exit 0//' >>"$TMPSHAR"
23 27
24 echo "Building $INSTALLER..." 28 echo "Building $INSTALLER..."
25 cp "@CMAKE_BINARY_DIR@/packaging/linux-installer.inc" "$INSTALLER" 29 cp "@CMAKE_BINARY_DIR@/packaging/linux-installer.inc" "$INSTALLER"
26 cd "$TMPDIR" 30 binnames=""
27 shar -z -B bin/* | sed 's/^exit 0//' >>"$TMPSHAR" 31 for file in "${EXEFILES[@]}" ; do
32 binnames="`basename $file` $binnames"
33 done
34 sed -i "s/###BINNAMES###/${binnames}/" "$INSTALLER"
28 sed -i "/###SHAR###/r $TMPSHAR" "$INSTALLER" 35 sed -i "/###SHAR###/r $TMPSHAR" "$INSTALLER"
29 chmod +x "$INSTALLER" 36 chmod +x "$INSTALLER"
30 37
31 echo "Cleaning up..." 38 echo "Cleaning up..."
32 rm -r "$TMPDIR" 39 rm -r "$TMPDIR"

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