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

Contents of /meta-cvs/F-156CAB88D4EEE783E8C4B4146B5094E2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations)
Sat Sep 21 18:42:42 2002 UTC (11 years, 6 months ago) by kaz
Branch: MAIN
CVS Tags: mcvs-0-96
Changes since 1.10: +2 -2 lines
* code/install.sh: Don't specify -K full option when running
specific, generated CLISP image already. When generating mcvs.mem,
load the compiled version mcvs-main, rather than mcvs-main.lisp.
1 #!/bin/sh
2
3 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 LINKSET=unix-bindings-linking-set
12 LISPRUN=$LINKSET/lisp.run
13
14 if [ $# != 1 ] ; then
15 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 exit 1
23 else
24 TARGET="$1"
25 fi
26
27 function space_check ()
28 {
29 if [ $# -gt 1 ] ; then
30 echo "The path \"$*\" contains whitespace."
31 exit 1
32 fi
33 }
34
35 function dash_check ()
36 {
37 case $1 in
38 -* )
39 echo "The path $1 looks like a command line option."
40 exit 1
41 ;;
42 esac
43 }
44
45 space_check $TARGET
46 dash_check $TARGET
47
48 TARGET_LIB=$TARGET/lib/clisp/meta-cvs
49 TARGET_BIN=$TARGET/bin
50
51 if ! mkdir -p $TARGET_LIB ; then
52 echo "Unable to create $TARGET_LIB directory."
53 exit 1
54 fi
55
56 if ! mkdir -p $TARGET_BIN ; then
57 echo "Unable to create $TARGET_BIN directory."
58 exit 1
59 fi
60
61 if [ ! -e $LINKSET ] ; then
62 export CLISP_LINKKIT="$CLISP_LIB/linkkit"
63 sh "$CLISP_LIB/clisp-link" add-module-set unix-bindings \
64 "$CLISP_LIB/base" $LINKSET
65 fi
66
67 if ! $LISPRUN -M $LINKSET/lispinit.mem -q -c mcvs-main ; then
68 echo "There were compilation errors."
69 exit 1
70 fi
71
72 $LISPRUN -M $LINKSET/lispinit.mem -q -i mcvs-main -x '(ext:saveinitmem "mcvs.mem" :quiet t)'
73
74 if ! cp mcvs.mem $TARGET_LIB/lispinit.mem; then
75 echo "Unable to copy to $TARGET_LIB."
76 exit 1
77 fi
78
79 if ! cp $LINKSET/lisp.run $TARGET_LIB; then
80 echo "Unable to copy to $TARGET_LIB."
81 exit 1
82 fi
83
84 if ! cat > $TARGET_BIN/mcvs <<END
85 #!$TARGET_LIB/lisp.run -M$TARGET_LIB/lispinit.mem
86 (mcvs)
87 END
88 then
89 echo "Could not create mcvs script in $TARGET."
90 exit 1
91 fi
92
93 if ! chmod a+x "$TARGET_BIN/mcvs" ; then
94 echo "Could not set permissions of mcvs script in $TARGET."
95 exit 1
96 fi
97
98 exit 0

  ViewVC Help
Powered by ViewVC 1.1.5