summary refs log tree commit diff
path: root/install.sh
blob: 11269fb7ce659dd0777c231133d9e9832e2fdb77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
set -eu

X=
while getopts 'X' opt; do
	case "$opt" in
		(X) X=1;;
		(?) exit 1;;
	esac
done

packages='curl htop sl the_silver_searcher tree'

FreeBSD() {
	pkg install ddate $packages
}

OpenBSD() {
	pkg_add $packages
	if test $X; then
		pkg_add firefox go-fonts imv scrot sct w3m-- xcursor-dmz xsel
	fi
}

Linux() {
	packages=$(
		echo $packages | sed 's/the_silver_searcher/silversearcher-ag/'
	)
	apt-get install bc build-essential exuberant-ctags gdb nvi $packages
}

Darwin() {
	packages=$(echo $packages | sed 's/the_silver_searcher/ag/')
	cd git/jorts
	git pull
	./Install git mandoc nvi $packages
}

$(uname)