summaryrefslogtreecommitdiff
path: root/scripts/adkprepare.sh
blob: 5b18d30e3a2120e6653c305a9df689c8d4d04386 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

os=$(uname)
ver=$(uname -r)
arch=$(uname -m)

linux() {
	echo "Preparing Linux for OpenADK is not implemented, yet"
	exit 1
}

darwin() {
	echo "Preparing MacOS X for OpenADK, is not implemented, yet"
	exit 1
}

openbsd() {
	echo "Preparing OpenBSD for OpenADK"
	PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/${ver}/packages/${arch}/"
	export PKG_PATH
	pkg_add -v gmake
	pkg_add -v bash
	pkg_add -v wget
	pkg_add -v gtar--
	pkg_add -v gawk
	pkg_add -v gsed
}

netbsd() {
	echo "Preparing NetBSD for OpenADK"
	PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/${arch}/${ver}/All/"
	export PKG_PATH
	pkg_add -vu gmake
	pkg_add -vu bash
	pkg_add -vu wget
	pkg_add -vu gtar
	pkg_add -vu gsed
	pkg_add -vu gawk
}

freebsd() {
	echo "Preparing FreeBSD for OpenADK"
	pkg_add -r gmake bash wget gtar gsed gawk
}

case $os in 
	Linux)
		linux
		;;
	FreeBSD)
		freebsd
		;;
	OpenBSD)
		openbsd
		;;
	NetBSD)
		netbsd
		;;
	Darwin)
		darwin
		;;
	*)
		echo "OS not supported"
		;;
esac