summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-09-11 20:49:19 -0400
committerJune McEnroe <june@causal.agency>2020-09-11 20:49:19 -0400
commit07fc93ec497ed8308dc8a151798110d9bef68731 (patch)
tree1eaea4405450d8686152ab0efc09a158a41afb92
parentAdd debian VM name to ssh (diff)
downloadsrc-07fc93ec497ed8308dc8a151798110d9bef68731.tar.gz
src-07fc93ec497ed8308dc8a151798110d9bef68731.zip
Use MacPorts rather than pkgsrc
My system is probably such a mess now...
Diffstat (limited to '')
-rw-r--r--home/.profile2
-rw-r--r--install.sh33
2 files changed, 13 insertions, 22 deletions
diff --git a/home/.profile b/home/.profile
index 796e975f..53942ba3 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/pkg /usr /opt/pkg ~/.local; do
+for prefix in '' /usr/local /opt/local /usr/pkg /usr ~/.local; do
 	path "${prefix}/sbin"
 	path "${prefix}/bin"
 done
diff --git a/install.sh b/install.sh
index 55e071fa..46ebd926 100644
--- a/install.sh
+++ b/install.sh
@@ -2,34 +2,25 @@
 set -eu
 
 pkgAny='curl htop sl the_silver_searcher tree'
-pkgDarwin="${pkgAny}"
+pkgDarwin="${pkgAny} git neovim pkg-config"
 pkgFreeBSD="${pkgAny} ddate neovim"
 pkgLinux="${pkgAny} bc ctags gdb neovim openssh"
 pkgNetBSD="${pkgAny} vim"
 pkgOpenBSD="${pkgAny} neovim"
 
-pkgsrcTag='20171103'
-neovimTag='v0.4.3'
 Darwin() {
-	xcode-select --install || true
-	if [ ! -d /opt/pkg ]; then
-		tar="bootstrap-trunk-x86_64-${pkgsrcTag}.tar.gz"
-		url="https://pkgsrc.joyent.com/packages/Darwin/bootstrap/${tar}"
-		curl -O "$url"
-		sudo tar -pxz -f "$tar" -C /
-		rm "$tar"
-	fi
-	sudo pkgin update
-	sudo pkgin install $pkgDarwin
-	sudo ln -fs /opt/pkg/bin/gpg2 /usr/local/bin/gpg
-	if [ ! -f /usr/local/bin/nvim ]; then
-		tar='nvim-macos.tar.gz'
-		base='https://github.com/neovim/neovim/releases/download'
-		url="${base}/${neovimTag}/${tar}"
-		curl -L -O "$url"
-		sudo tar -x -f "$tar" -C /usr/local --strip-components 1
-		rm "$tar"
+	if [ ! -d /opt/local ]; then
+		dir=MacPorts-2.6.3
+		tar=${dir}.tar.bz2
+		curl -O "https://distfiles.macports.org/MacPorts/${tar}"
+		tar -x -f $tar
+		(cd $dir && ./configure)
+		make -C $dir
+		sudo make -C $dir install
+		rm -fr $tar $dir
 	fi
+	sudo /opt/local/bin/port selfupdate
+	sudo /opt/local/bin/port -N install $pkgDarwin
 }
 
 FreeBSD() {