File: Install

package info (click to toggle)
chos 0.85-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 908 kB
  • ctags: 1,020
  • sloc: ansic: 4,365; asm: 2,377; tcl: 1,976; makefile: 182; sh: 87
file content (93 lines) | stat: -rwxr-xr-x 1,983 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
92
93
#!/bin/sh
#
# Choose-OS Installation script
#
# Copyright (c) Tuomo Valkonen 1997-1998.
#

set -e

question()
{
	read answer
	if [ "$answer" ] ; then
		return 0
	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.84 !
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] "
question "N"
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] "
question "/usr/bin/wish4.2"
case $answer in
n|N|no|NO|No)
	no_vchos="true"
	;;
*)
	wish_path=$answer
esac

echo 	"Installing..."

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

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

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

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

echo	"Sample backgrounds in $1/boot/chos/bg ..."
mkdir -p $1/boot/chos/bg
install -m 644 samples/bg/* $1/boot/chos/bg

echo 	"Installation complete."