/[meta-cvs]/meta-cvs/F-156CAB88D4EEE783E8C4B4146B5094E2
ViewVC logotype

Contents of /meta-cvs/F-156CAB88D4EEE783E8C4B4146B5094E2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations)
Wed Sep 18 04:42:25 2002 UTC (11 years, 7 months ago) by kaz
Branch: MAIN
Changes since 1.7: +16 -6 lines
* code/install.sh: Check that the installation target path
does not contain any spaces. It cannot, because it is used
in the #! line of an interpreter script. As a consequence of
this check, whitespace precautions in the expansion of $TARGET,
$TARGET_LIB and $TARGET_BIN have been removed.
1 kaz 1.1 #!/bin/sh
2    
3 kaz 1.7 if ! CLISP_PATH="$(which clisp)" ; then
4     echo clisp command not found
5     exit 1
6     fi
7    
8     CLISP_ROOT=$(dirname $(dirname "$CLISP_PATH"))
9     CLISP_LIB="$CLISP_ROOT/lib/clisp"
10    
11 kaz 1.5 LINKSET=unix-bindings-linking-set
12 kaz 1.7 LISPRUN=$LINKSET/lisp.run
13 kaz 1.5
14 kaz 1.1 if [ $# != 1 ] ; then
15 kaz 1.5 echo
16     echo "Meta-CVS Installer"
17     echo
18     echo "Please specify the target prefix, as a full absolute path."
19     echo "For example, specifying /usr/local will place files under"
20     echo "/usr/local/bin and /usr/local/lib."
21     echo
22 kaz 1.1 exit 1
23     else
24 kaz 1.8 TARGET="$1"
25 kaz 1.1 fi
26    
27 kaz 1.8 function space_check ()
28     {
29     if [ $# -gt 1 ] ; then
30     echo The path \""$*"\" contains whitespace
31     exit 1
32     fi
33     }
34    
35     space_check $TARGET
36    
37     TARGET_LIB=$TARGET/lib/clisp/meta-cvs
38     TARGET_BIN=$TARGET/bin
39 kaz 1.5
40     if ! mkdir -p $TARGET_LIB ; then
41     echo "Unable to create $TARGET_LIB directory."
42     exit 1
43     fi
44    
45     if ! mkdir -p $TARGET_BIN ; then
46     echo "Unable to create $TARGET_BIN directory."
47     exit 1
48     fi
49    
50     if [ ! -e $LINKSET ] ; then
51 kaz 1.7 export CLISP_LINKKIT="$CLISP_LIB/linkkit"
52     sh "$CLISP_LIB/clisp-link" add-module-set unix-bindings \
53     "$CLISP_LIB/base" $LINKSET
54 kaz 1.5 fi
55    
56 kaz 1.7 if ! $LISPRUN -M $LINKSET/lispinit.mem -K full -q -c mcvs-main.lisp ; then
57 kaz 1.3 echo "There were compilation errors."
58     exit 1
59     fi
60    
61 kaz 1.7 $LISPRUN -M $LINKSET/lispinit.mem -K full -q -i mcvs-main.lisp -x '(ext:saveinitmem "mcvs.mem" :quiet t)'
62 kaz 1.5
63 kaz 1.8 if ! cp mcvs.mem $TARGET_LIB/lispinit.mem; then
64 kaz 1.5 echo "unable to copy to $TARGET_LIB"
65     exit 1
66     fi
67 kaz 1.1
68 kaz 1.8 if ! cp $LINKSET/lisp.run $TARGET_LIB; then
69 kaz 1.5 echo "unable to copy to $TARGET_LIB"
70 kaz 1.1 exit 1
71     fi
72    
73 kaz 1.8 if ! cat > $TARGET_BIN/mcvs <<END
74 kaz 1.5 #!$TARGET_LIB/lisp.run -M$TARGET_LIB/lispinit.mem
75 kaz 1.1 (mcvs)
76     END
77     then
78     echo "could not create mcvs script in $TARGET"
79     exit 1
80     fi
81    
82 kaz 1.5 if ! chmod a+x "$TARGET_BIN/mcvs" ; then
83 kaz 1.1 echo "could not set permissions of mcvs script in $TARGET"
84     exit 1
85     fi
86    
87     exit 0

  ViewVC Help
Powered by ViewVC 1.1.5