From: Ramakrishnan Muthukrishnan Date: Wed, 2 Sep 2015 04:44:06 +0000 (+0530) Subject: OS-X package: add a preinstall script and copy the manpage into /etc/manpaths.d. X-Git-Url: https://git.rkrishnan.org/vdrive/%22news.html/simplejson/flags/configuration.rst?a=commitdiff_plain;h=e92a9774fa49f61fd7b08527c0550615e0df1a20;p=tahoe-lafs%2Ftahoe-lafs.git 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 --- diff --git a/misc/build_helpers/osx/scripts/postinstall b/misc/build_helpers/osx/scripts/postinstall index aefc4fd3..48042618 100755 --- a/misc/build_helpers/osx/scripts/postinstall +++ b/misc/build_helpers/osx/scripts/postinstall @@ -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 diff --git a/misc/build_helpers/osx/scripts/preinstall b/misc/build_helpers/osx/scripts/preinstall new file mode 100755 index 00000000..b96aafe6 --- /dev/null +++ b/misc/build_helpers/osx/scripts/preinstall @@ -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 \ No newline at end of file