File: install.sh

package info (click to toggle)
rrootage 0.23a-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,636 kB
  • sloc: cpp: 11,562; ansic: 3,444; xml: 2,032; makefile: 127; yacc: 124; sh: 52
file content (62 lines) | stat: -rwxr-xr-x 1,292 bytes parent folder | download | duplicates (8)
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
#!/bin/sh

if [ -e rr ];
then
	printf "Copying files\n"
else
	printf "rr not found. Did you remember to download it?\n"
	printf "http://sourceforge.net/project/showfiles.php?group_id=112441\n"
	printf "Place it in the same directory as this script and re-run\n"
	exit 1
fi

if mkdir /usr/share/games/rRootage; then
	printf "Share files directory created\n"
else
	printf "This script must be run as root\n"
	exit 1
fi

if cp -pr rr_share/* /usr/share/games/rRootage; then
	printf "Share files copied\n"
else
	printf "This script must be run as root\n"
	exit 1
fi

if chown games. /usr/share/games/rRootage; then
	printf "/usr/share/games/rRootage chowned\n"
else
	printf "This script must be run as root\n"
	exit 1
fi

if chmod u=rwx,g=rx,o=rx /usr/share/games/rRootage; then
	printf "/usr/share/games/rRootage chmoded\n"
else
	printf "This script must be run as root\n"
	exit 1
fi

if cp -p rr /usr/bin; then
	printf "/usr/bin/rr copied\n"
else
	printf "This script must be run as root\n"
	exit 1
fi

if chown root. /usr/bin/rr; then
	printf "/usr/bin/rr chowned\n"
else
	printf "This script must be run as root\n"
	exit 1
fi

if chmod u=rwx,g=rx,o=rx /usr/bin/rr; then
	printf "/usr/bin/rr chmoded\n"
else
	printf "This script must be run as root\n"
	exit 1
fi

printf "Done. Run with rr\n"