summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-09-12 15:46:36 -0400
committerJune McEnroe <june@causal.agency>2020-09-12 15:58:39 -0400
commitfed52c75edeab8a250b24304d050e6fd85b8f2fc (patch)
tree3bc5267ea2ea3e2ef13c1b09fec560284f98aee9
parentMove /opt/local behind /usr again (diff)
downloadsrc-fed52c75edeab8a250b24304d050e6fd85b8f2fc.tar.gz
src-fed52c75edeab8a250b24304d050e6fd85b8f2fc.zip
Move /opt/local back, cheat port select to use system man
This is not really how you're supposed to use the select system, I don't
think, since the mandoc package actually creates those files, but it
does work. This lets me actually use the git installed by MacPorts.
-rw-r--r--home/.profile2
-rw-r--r--install.sh6
2 files changed, 7 insertions, 1 deletions
diff --git a/home/.profile b/home/.profile
index c54814de..ed6d9c67 100644
--- a/home/.profile
+++ b/home/.profile
@@ -1,6 +1,6 @@
 _PATH=$PATH PATH=
 path() { [ -d "$1" ] && PATH="${PATH}${PATH:+:}${1}"; }
-for prefix in '' /usr/local /usr /opt/local ~/.local; do
+for prefix in '' /usr/local /opt/local /usr ~/.local; do
 	path "${prefix}/sbin"
 	path "${prefix}/bin"
 done
diff --git a/install.sh b/install.sh
index f34c84e6..6051edaf 100644
--- a/install.sh
+++ b/install.sh
@@ -32,6 +32,12 @@ Darwin() {
 	[ -d /opt/local ] || installMacPorts
 	sudo /opt/local/bin/port selfupdate
 	sudo /opt/local/bin/port -N install git mandoc pkgconfig $packages
+	sudo mkdir -p /opt/local/etc/select/man
+	printf 'bin/man\nshare/man/man1/man.1\nshare/man/man1/man.1.gz\n' \
+		| sudo tee /opt/local/etc/select/man/base >/dev/null
+	printf '/usr/bin/man\n/usr/share/man/man1/man.1\n-\n' \
+		| sudo tee /opt/local/etc/select/man/system >/dev/null
+	sudo port select --set man system
 }
 
 $(uname)