diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:38 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:38 +0100 |
commit | d0ca838c7ab297036b4a7c45351761a48fe05efd (patch) | |
tree | f0f3cc006e8157d6bd699bd644b7dd7b35387ac2 /distribution/posix/postinst | |
parent | fd6639655b399a79fb72f494786a4f57da9c90e7 (diff) | |
parent | 5d2c2b27a6323e2666378b986129b2a7c2c39e5c (diff) |
Update upstream source from tag 'upstream/5.2.2GA'
Update to upstream version '5.2.2GA'
with Debian dir 9c80045d0b4f9e463647bc8af8c090a673df4132
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 |