OS-X package: add a preinstall script and copy the manpage into /etc/manpaths.d.

The preinstall script detects previous installation and removes it.

Author: Ramakrishnan Muthukrishnan <ram@leastauthority.com>
This commit is contained in:
Ramakrishnan Muthukrishnan 2015-09-02 10:14:06 +05:30 committed by Daira Hopwood
parent 7309aed524
commit e92a9774fa
2 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,8 @@
#!/bin/bash
echo "/Applications/tahoe.app/bin" >> /etc/paths.d/tahoe
PWD=`pwd`
echo "/Applications/tahoe.app/bin/" >> /etc/paths.d/tahoe
# copy the manpage into /etc/manpaths.d/
echo "/Applications/tahoe.app/docs/man/" >> /etc/manpaths.d/tahoe

View File

@ -0,0 +1,13 @@
#!/bin/bash
if [ -d /Applications/tahoe.app ]; then
rm -r /Applications/tahoe.app
fi
if [ -f /etc/paths.d/tahoe ]; then
rm /etc/paths.d/tahoe
fi
if [ -f /etc/manpaths.d/tahoe.1 ]; then
rm /etc/manpaths.d/tahoe.1
fi