File: pslinst.csh

package info (click to toggle)
bergman 1.001%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 12,608 kB
  • sloc: csh: 1,690; lisp: 1,459; sh: 747; ansic: 57; haskell: 36; makefile: 12
file content (68 lines) | stat: -rwxr-xr-x 1,548 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
#!/bin/csh
# auxil/pslinst.csh

# Problems (inter alia):

# - The psl procedure SYSTEM calls sh, not csh.

# - SYSTEM output is on the stdout, not respecting psl WRS (WRite Select).

# - Even if we could get around this, these psl procedures and behaviours
#   are (probably) not very standard.

# - The small script part
##   $tmpPSL <<EOR1>tmparch
##   (system "echo $MACHINE")
##   EOR1
#   collapses, because csh (tries to) expand $MACHINE BEFORE it is read by
#   the psl shell.


rm -f tmppi*

while test -z "$tmpPSL"; do
  tmpPSL=`which psl`;
  if [ -z "$tmpPSL" -o ! -x "$tmpPSL" ]; then
    echo "I cannot find the psl executable."
    echo "where is it?"
    set tmpPSL=$<
  fi
done

#$tmpPSL<"auxil/setenv.psl" > "/tmp.$$"
#. /tmp.$$

./auxil/pslvars.csh
source tmpvars

if [ -z "$MACHINE" -o -z "$proot" ]; then
  echo "Your psl $tmpPSL didn't set \$MACHINE and/or \$proot"
  echo "Something is terribly wrong with your $tmpPSL, please"
  echo "check your psl installation and restart"
  exit -1
fi

# $MACHINE and $proot are set.

# Now set the bmroot: ......


echo "I will now install bergman under psl using the following settings: "
% echo "PSL: $tmpPSL"
echo "MACHINE: $MACHINE"
echo "proot: $proot"
echo 
echo -n  "Is this ok (y/n)"
set ans=$<
# One might argue for a while loop around this giving
# the user an oportunity to practice using the keyboard.
switch ($ans)
 case [Yy]*:
	 ./scripts/$MACHINE/mkbergman $proot .
	 breaksw

 case [Nn]*:
	 echo "Ok; you may follow the instructions in ReadMe instead."
	 exit
endsw