diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:24 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:24 +0100 |
commit | 5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch) | |
tree | ce8982b6c0111f79791068de2c2d4c6ce3138a49 /distribution/posix/postinst | |
parent | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff) |
New upstream version 5.2.2GAupstream/5.2.2GA
Diffstat (limited to 'distribution/posix/postinst')
-rwxr-xr-x | distribution/posix/postinst | 21 |
1 files changed, 21 insertions, 0 deletions
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 |