File: Install

package info (click to toggle)
chos 0.82-2
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 1,024 kB
  • ctags: 968
  • sloc: ansic: 4,180; asm: 2,103; tcl: 1,976; makefile: 152; sh: 79
file content (91 lines) | stat: -rwxr-xr-x 2,010 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/sh
#
# Choose-OS Installation script
#
# Copyright (c) Tuomo Valkonen 1997-1998.
#

question()
{
	read answer
	if [ "$answer" ] ; then
		return 1
	else
		answer=$1
		return 0
	fi
}

if [ `id -u` != 0 ]; then
	echo "You must be root to install Choose-OS." ; exit 1
fi
        
echo
echo Welcome to Choose-OS 0.82 !
echo
echo This script will install Choose-OS on your system.
echo Before you may continue, you must have read the README.
echo

#
# Has the user read the README?
#################################
echo -n "Have you read the README? [y/N] "
answer="Y"
case $answer in
y|Y|yes|YES|Yes)
	;;
*)
	less -r README
	echo
	echo Press any key to continue the installation process or ^C to abort...
	read
esac

#
# Ask for Wish4.2 path
########################
echo
echo For Visual Chos you need Tcl 7.6 and Tk 4.2
echo If you don't have them or just don't wish to install vchos then 
echo answer "no" to the following prompt.
echo Otherwise enter the path where wish4.2 can be found.
echo Usually it exists in /usr/local/bin/wish4.2 or /usr/bin/wish4.2
echo
echo -n "Where can I find wish4.2? [/usr/bin/wish4.2] "
answer="/usr/bin/wish"
case $answer in
n|N|no|NO|No)
	no_vchos="true"
	;;
*)
	wish_path=$answer
esac

echo 	"Installing..."

echo	"Chos binaries in /boot and /sbin..."
install -m 700 bin/chos 	$1/sbin
install -m 644 bin/chos.* 	$1/boot

echo	"Modpart in /sbin..."
install -m 755 utils/modpart	$1/sbin

echo	"Showscreen in /bin and xshowscreen in /usr/bin/X11.."
install -m 755 utils/showscreen  $1/usr/bin
install -m 755 utils/xshowscreen $1/usr/X11R6/bin

if [ "$no_vchos" != "true" ] ; then
	echo "Visual chos in /usr/bin/X11..."
	echo  "#!$wish_path"  >	$1/usr/X11R6/bin/vchos
	cat   utils/vchos     >>$1/usr/X11R6/bin/vchos	
	chmod 755 		$1/usr/X11R6/bin/vchos
else
	echo "Skipping Visual Chos..."
fi

echo	"Sample backgrounds in /boot/bg ..."
#mkdirhier /boot/bg	# Doesn't give error if it exists unlike mkdir
install -m 644 samples/bg/* $1/boot/bg

echo 	"Installation complete."