summaryrefslogtreecommitdiff
path: root/distribution/posix/prerm
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
commit5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch)
treece8982b6c0111f79791068de2c2d4c6ce3138a49 /distribution/posix/prerm
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
New upstream version 5.2.2GAupstream/5.2.2GA
Diffstat (limited to 'distribution/posix/prerm')
-rwxr-xr-xdistribution/posix/prerm22
1 files changed, 22 insertions, 0 deletions
diff --git a/distribution/posix/prerm b/distribution/posix/prerm
new file mode 100755
index 0000000..3c5db28
--- /dev/null
+++ b/distribution/posix/prerm
@@ -0,0 +1,22 @@
+#!/bin/sh
+LOGF=/tmp/xtrkcad-setup.log
+if [ -f "${LOGF}" ] ; then
+ chmod 666 ${LOGF}
+ echo prerm: $* >> ${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 remove ${INSTALLDIR}" -l $SUDO_USER ) >> ${LOGF} 2>&1
+
+exit 0
+