aboutsummaryrefslogtreecommitdiff
path: root/utils
blob: 0b94707cb247a238571fd045dd5044f9875fc227 (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
# vim: ft=sh

die() {
	kill $$
}

inst_f() {
	if [ -f "$2" ]; then
	else
		mkdir "$(basedir "$2")"
		echo "New file: $1 -> $2"
	fi
}

inst_d() {
	# TODO
	true
}

inst() {
	if [ -f "$1" ]; then
		inst_f "$1" "$2"
	elif [ -d "$1" ]; then
		inst_d "$1" "$2"
	else
		echo "Unsupported install target type of: $1"
		die
	fi
}