diff -r 000000000000 -r 0121592e2512 tests/pre-inst/post.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/pre-inst/post.sh Thu Jul 16 19:54:45 2020 +0100
@@ -0,0 +1,30 @@
+#!/bin/sh
+set -x
+tmpdir=`mktemp -dt` || exit 1
+if [ $# -gt 0 ]; then
+ cp "$1" $tmpdir/pre-inst
+else
+ cp ../../pre-inst/pre-inst $tmpdir/pre-inst
+fi
+mkdir $tmpdir/repodata
+cat << EOF > $tmpdir/repodata/primary.xml
+
+
+
+EOF
+cat << EOF > $tmpdir/repodata/filelists.xml
+
+
+
+EOF
+gzip $tmpdir/repodata/primary.xml $tmpdir/repodata/filelists.xml
+pre_inst="$tmpdir/pre-inst"
+export PLOVER_PRE_INSTALL_PREFIX="$tmpdir"
+$pre_inst --post "touch $tmpdir/xyzzy"
+if [ -f $tmpdir/xyzzy ]; then
+ rm -rf "$tmpdir"
+ exit 0
+else
+ cat "$tmpdir/var/log/pre-install"
+ exit 1
+fi