File: install

package info (click to toggle)
splat 1.1.1-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 536 kB
  • ctags: 207
  • sloc: cpp: 4,594; ansic: 697; sh: 243; makefile: 43
file content (59 lines) | stat: -rwxr-xr-x 1,016 bytes parent folder | download
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
#!/bin/bash
#
# Simple shell script for installing SPLAT! and associated utilities.
# Written by John A. Magliacane, KD2BD April 2002
#

install_splat()
{
	cp splat /usr/local/bin
	echo "SPLAT! installed!"
}

install_utils()
{
	cd utils
	./install all
	cd ..
	echo "utils installed!"
}

install_man()
{
	cp docs/man/splat.1 /usr/local/man/man1/splat.1
	echo "man page installed!"
}

whoami=`whoami`

if [ $# == "0" ]; then
	echo "Usage: ./install { splat, utils, man, all }"
else
	if [ $whoami == "root" ]; then

		if [ $1 == "splat" ] && [ -x splat ]; then
			install_splat
		fi

		if [ $1 == "utils" ]; then
			install_utils
		fi

		if [ $1 == "man" ]; then
			install_man
		fi

		if [ $1 == "all" ] && [ -x splat ]; then
			install_splat
			install_utils
			install_man
		fi
	else
		echo "Sorry, $whoami.  You need to be 'root' to install this software.  :-("
	fi

	if [ $1 != "splat" ] && [ $1 != "utils" ] && [ $1 != "man" ] && [ $1 != "all" ]; then
		echo "Usage: ./install { splat, utils, man, all }"
	fi
fi