From 5d2c2b27a6323e2666378b986129b2a7c2c39e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 6 Feb 2022 16:04:24 +0100 Subject: New upstream version 5.2.2GA --- distribution/posix/postinst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 distribution/posix/postinst (limited to 'distribution/posix/postinst') diff --git a/distribution/posix/postinst b/distribution/posix/postinst new file mode 100755 index 0000000..914534d --- /dev/null +++ b/distribution/posix/postinst @@ -0,0 +1,21 @@ +#!/bin/sh +LOGF=/tmp/xtrkcad-setup.log +if [ -f "${LOGF}" ] ; then + chmod 666 ${LOGF} + echo postinst: $* >> ${LOGF} +else + LOGF=/dev/null +fi + +if [ -d /usr/local/share/xtrkcad ] ; then + INSTALLDIR=/usr/local/share/xtrkcad +elif [ -d /usr/share/xtrkcad ] ; then + INSTALLDIR=/usr/share/xtrkcad +else + echo No existing XTrkCad install >> ${LOGF} + exit 1 +fi + +( su -c "sh ${INSTALLDIR}/xtrkcad-setup install ${INSTALLDIR}" -l $SUDO_USER ) >> ${LOGF} 2>&1 + +exit 0 -- cgit v1.2.3