diff options
author | June McEnroe <june@causal.agency> | 2020-09-11 21:05:02 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-09-11 21:05:02 -0400 |
commit | ad3fc707085b809e08fcb7fb695db7036e9fbb00 (patch) | |
tree | 3ea84a8dc5724c290fd86b0519bc8e698b578b2c | |
parent | Remove NetBSD from install script (diff) | |
download | src-ad3fc707085b809e08fcb7fb695db7036e9fbb00.tar.gz src-ad3fc707085b809e08fcb7fb695db7036e9fbb00.zip |
Rewrite install script yet again
Diffstat (limited to '')
-rw-r--r-- | install.sh | 46 |
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) |