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

Contents of /meta-cvs/F-156CAB88D4EEE783E8C4B4146B5094E2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations)
Thu Oct 31 04:06:01 2002 UTC (11 years, 5 months ago) by kaz
Branch: MAIN
Changes since 1.13: +1 -1 lines
* code/mcvs-package.lisp: New file, defines META-CVS package.

* code/purge.lisp: Put all symbols in new package.
* code/restore.lisp: Likewise.
* code/paths.lisp: Likewise.
* code/install.sh: Likewise.
* code/restart.lisp: Likewise.
* code/update.lisp: Likewise.
* code/move.lisp: Likewise.
* code/grab.lisp: Likewise.
* code/unix.lisp: Likewise.
* code/slot-refs.lisp: Likewise.
* code/prop.lisp: Likewise.
* code/multi-hash.lisp: Likewise.
* code/rcs-utils.lisp: Likewise.
* code/branch.lisp: Likewise.
* code/find-bind.lisp: Likewise.
* code/execute.lisp: Likewise.
* code/link.lisp: Likewise.
* code/split.lisp: Likewise.
* code/watch.lisp: Likewise.
* code/clisp-unix.lisp: Likewise.
* code/add.lisp: Likewise.
* code/chatter.lisp: Likewise.
* code/print.lisp: Likewise.
* code/types.lisp: Likewise.
* code/remove.lisp: Likewise.
* code/convert.lisp: Likewise.
* code/error.lisp: Likewise.
* code/options.lisp: Likewise.
* code/dirwalk.lisp: Likewise.
* code/checkout.lisp: Likewise.
* code/generic.lisp: Likewise.
* code/sync.lisp: Likewise.
* code/create.lisp: Likewise.
* code/memoize.lisp: Likewise.
* code/seqfuncs.lisp: Likewise.
* code/cmucl-unix.lisp: Likewise.
* code/remap.lisp: Likewise.

* code/mapping.lisp: Put symbols in new package. Replace use
of CLISP specific substring function with subseq.
* code/filt.lisp: Likewise.

* code/mcvs-main.lisp: Put symbols in new package. The mcvs
function is renamed to main.

* code/install.sh: Generate mcvs script that uses qualified name
of new startup functiont to start the software.
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.12 space_check()
28 kaz 1.8 {
29     if [ $# -gt 1 ] ; then
30 kaz 1.9 echo "The path \"$*\" contains whitespace."
31 kaz 1.8 exit 1
32     fi
33     }
34    
35 kaz 1.12 dash_check()
36 kaz 1.10 {
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 kaz 1.8 space_check $TARGET
46 kaz 1.10 dash_check $TARGET
47 kaz 1.8
48     TARGET_LIB=$TARGET/lib/clisp/meta-cvs
49     TARGET_BIN=$TARGET/bin
50 kaz 1.5
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 kaz 1.7 export CLISP_LINKKIT="$CLISP_LIB/linkkit"
63     sh "$CLISP_LIB/clisp-link" add-module-set unix-bindings \
64     "$CLISP_LIB/base" $LINKSET
65 kaz 1.5 fi
66    
67 kaz 1.11 if ! $LISPRUN -M $LINKSET/lispinit.mem -q -c mcvs-main ; then
68 kaz 1.3 echo "There were compilation errors."
69     exit 1
70     fi
71    
72 kaz 1.11 $LISPRUN -M $LINKSET/lispinit.mem -q -i mcvs-main -x '(ext:saveinitmem "mcvs.mem" :quiet t)'
73 kaz 1.5
74 kaz 1.8 if ! cp mcvs.mem $TARGET_LIB/lispinit.mem; then
75 kaz 1.9 echo "Unable to copy to $TARGET_LIB."
76 kaz 1.5 exit 1
77     fi
78 kaz 1.1
79 kaz 1.8 if ! cp $LINKSET/lisp.run $TARGET_LIB; then
80 kaz 1.9 echo "Unable to copy to $TARGET_LIB."
81 kaz 1.1 exit 1
82     fi
83    
84 kaz 1.8 if ! cat > $TARGET_BIN/mcvs <<END
85 kaz 1.5 #!$TARGET_LIB/lisp.run -M$TARGET_LIB/lispinit.mem
86 kaz 1.14 (meta-cvs:main)
87 kaz 1.1 END
88     then
89 kaz 1.9 echo "Could not create mcvs script in $TARGET."
90 kaz 1.1 exit 1
91     fi
92    
93 kaz 1.5 if ! chmod a+x "$TARGET_BIN/mcvs" ; then
94 kaz 1.9 echo "Could not set permissions of mcvs script in $TARGET."
95 kaz 1.1 exit 1
96     fi
97    
98 kaz 1.13 if ! cat > $TARGET_BIN/mcvs-upgrade <<END
99     #!/bin/sh
100     TARGET_LIB="$TARGET_LIB"
101     LISPRUN="\$TARGET_LIB/lisp.run -M \$TARGET_LIB/lispinit.mem"
102    
103     if [ \$# != 1 ] ; then
104     echo
105     echo "Syntax:"
106     echo
107     echo " mcvs-upgrade <path-to-source>"
108     echo
109     echo "The path specifies the directory which holds unpacked Meta-CVS source,"
110     echo "the place where the file mcvs-main.lisp is located."
111     echo
112     echo "This upgrade mechanism is intended to make it possible to use a"
113     echo "newer version of Meta-CVS without having to obtain a complete binary"
114     echo "distribution that includes the Lisp executable, and without having"
115     echo "to install the Lisp development environment to build the sources."
116     echo
117     echo "Note that it's not possible to upgrade if the newer Meta-CVS sources"
118     echo "rely on new C functions being linked into the Lisp system; get a"
119     echo "new binary distribution, or set up CLISP and compile Meta-CVS from"
120     echo "the sources using its install.sh script"
121     echo
122     echo "Ignore the copious compiler warnings about objects and functions"
123     echo "being redefined; this is what we want."
124     echo
125     exit 1
126     fi
127    
128     SOURCE_PATH="\$1"
129    
130     if ! cd "\$SOURCE_PATH" ; then
131     echo "unable to change to \$SOURCE_PATH"
132     exit 1
133     fi
134    
135     if ! \$LISPRUN -c mcvs-main ; then
136     echo "unable to compile"
137     exit 1
138     fi
139    
140     if ! \$LISPRUN -q -i mcvs-main -x '(ext:saveinitmem "mcvs.mem" :quiet t)' ; then
141     echo "unable to load and generate memory image"
142     exit 1
143     fi
144    
145     if ! cp mcvs.mem \$TARGET_LIB/lispinit.mem ; then
146     echo "unable to copy new Meta-CVS image to \$TARGET_LIB directory."
147     exit 1
148     fi
149    
150     echo
151     echo "It appears that Meta-CVS has been re-generated from the given sources."
152     echo
153    
154     END
155     then
156     echo "Could not create mcvs script in $TARGET."
157     exit 1
158     fi
159    
160     if ! chmod a+x "$TARGET_BIN/mcvs-upgrade" ; then
161     echo "Could not set permissions of mcvs script in $TARGET."
162     exit 1
163     fi
164    
165 kaz 1.1 exit 0

  ViewVC Help
Powered by ViewVC 1.1.5