summary refs log tree commit diff
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--install.sh46
1 files changed, 23 insertions, 23 deletions
diff --git a/install.sh b/install.sh
index 33b1450e..871773ba 100644
--- a/install.sh
+++ b/install.sh
@@ -1,37 +1,37 @@
 #!/bin/sh
 set -eu
 
-pkgAny='curl htop sl the_silver_searcher tree'
-pkgDarwin="${pkgAny} git neovim pkg-config"
-pkgFreeBSD="${pkgAny} ddate neovim"
-pkgLinux="${pkgAny} bc ctags gdb neovim openssh"
-pkgOpenBSD="${pkgAny} neovim"
+packages='curl htop neovim sl the_silver_searcher tree'
 
-Darwin() {
-	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() {
+	sudo pkg install ddate $packages
 }
 
-FreeBSD() {
-	pkg install $pkgFreeBSD
+OpenBSD() {
+	doas pkg_add $packages
 }
 
 Linux() {
-	pacman -Sy --needed $pkgLinux
+	sudo pacman -Sy --needed bc ctags gdb openbssh $packages
 }
 
-OpenBSD() {
-	pkg_add $pkgOpenBSD
+installMacPorts() {
+	xcode-select --install
+	xcodebuild -license
+	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
+}
+
+Darwin() {
+	[ -d /opt/local ] || installMacPorts
+	sudo /opt/local/bin/port selfupdate
+	sudo /opt/local/bin/port -N install git pkgconfig $packages
 }
 
 $(uname)
>Add Dirk Gently's Holistic Detective AgencyJune McEnroe 2019-02-20Move /opt/pkg after /usr in PATHJune McEnroe 2019-02-20Set man_hard_wrap in nvimJune McEnroe 2019-02-18Use hi -o anchor in upJune McEnroe 2019-02-18Don't match nested parentheses in Tag for CJune McEnroe 2019-02-18Match whitespace between * [] {}June McEnroe 2019-02-18Fix function-like #define regexJune McEnroe 2019-02-18Match Tag in RustJune McEnroe 2019-02-18Match sh functions as TagJune McEnroe 2019-02-18Match Sh and Ss as Tag in mdocJune McEnroe 2019-02-18Match statics and typedefs as TagJune McEnroe 2019-02-18Clean up htmlHeaderJune McEnroe 2019-02-18Remove hi line numberingJune McEnroe 2019-02-18Add Tag class to hiJune McEnroe 2019-02-17Generate HTML with hi -n -f html -o anchorJune McEnroe 2019-02-17Add hi -f html -o anchor for line number linksJune McEnroe 2019-02-17Simplify temp trap in upJune McEnroe 2019-02-17Add line numbers to hiJune McEnroe 2019-02-17Always split spans after newlinesJune McEnroe 2019-02-15Color format specifiers light cyan in vimJune McEnroe 2019-02-15Highlight Interp as yellowJune McEnroe 2019-02-15Highlight strings in sh command substitutionsJune McEnroe 2019-02-15Add nmap gpJune McEnroe 2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe 2019-02-13Add forgotten "sixth" book of H2G2June McEnroe