]> git.pld-linux.org Git - packages/sbcl.git/blob - sbcl.sh
updated x86 bootstrap binary version
[packages/sbcl.git] / sbcl.sh
1 #!/bin/sh
2
3 if [ ! -f /usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp ] ; then
4   cat <<EOF
5 OF
6 $0: cannot find the common-lisp-controller source.
7 EOF
8   exit 0
9 fi
10
11 build_error()
12 {
13     echo "Build failure $1"
14     exit 1
15 }
16
17 if [ -f /etc/sbcl.rc ] ; then
18   RCFILE=/etc/sbcl.rc
19 else
20   RCFILE=/dev/null
21 fi
22
23 case $1 in
24     install-clc)
25     echo $0 loading and dumping clc.
26     ( cd /usr/lib/sbcl
27          /usr/bin/sbcl \
28            --noinform --disable-ldb \
29            --core /usr/lib/sbcl/sbcl-dist.core \
30            --sysinit ${RCFILE} --no-userinit \
31            --load "/usr/lib/sbcl/install-clc.lisp" --non-interactive # 2> /dev/null
32               (mv sbcl-new.core sbcl.core && touch sbcl.core --reference=sbcl-dist.core ) || (echo FAILED ; cp -a sbcl-dist.core sbcl.core ) )
33     ;;
34     remove-clc)
35     echo $0 removing clc-enabled image
36     cp -a /usr/lib/sbcl/sbcl-dist.core /usr/lib/sbcl/sbcl.core
37     ;;
38     rebuild)
39     echo $0 rebuilding...
40     shift
41     echo rebuilding $1
42     /usr/bin/sbcl \
43              --noinform --disable-ldb \
44              --sysinit ${RCFILE} --no-userinit \
45              --eval \
46 "(handler-case
47      (progn
48        (asdf:operate 'asdf:compile-op (quote $1))
49        (sb-sys:os-exit 0))
50     (error (e)
51       (ignore-errors (format t \"~&Build error: ~A~%\" e))
52       (finish-output)
53       (sb-sys:os-exit 1)))" --non-interactive || build_error
54     ;;
55      remove)
56     echo $0 removing packages...
57     shift
58     while [ ! -z "$1" ] ; do
59 rm -rf "/var/cache/common-lisp-controller/*/sbcl/${1}"
60 shift
61      done
62     ;;
63     *)
64     echo $0 unkown command $1
65     echo known commands: rebuild, remove, install-clc, and remove-clc
66     exit 1
67     ;;
68 esac
69
70 exit 0
This page took 0.081636 seconds and 3 git commands to generate.