blob: 914534d3249bdfdefb25100cd4110a3cb02f2949 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
|