]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
OS-X package: add a preinstall script and copy the manpage into /etc/manpaths.d.
authorRamakrishnan Muthukrishnan <ram@acano.com>
Wed, 2 Sep 2015 04:44:06 +0000 (10:14 +0530)
committerDaira Hopwood <daira@jacaranda.org>
Thu, 3 Sep 2015 14:18:08 +0000 (15:18 +0100)
The preinstall script detects previous installation and removes it.

Author: Ramakrishnan Muthukrishnan <ram@leastauthority.com>

misc/build_helpers/osx/scripts/postinstall
misc/build_helpers/osx/scripts/preinstall [new file with mode: 0755]

index aefc4fd316b2dcc15e4d93fccc3b76479d043b00..480426184dedd8b1a43bac507d5a25a7fe3f6bcb 100755 (executable)
@@ -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 (executable)
index 0000000..b96aafe
--- /dev/null
@@ -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