Debian Codegraph @

debian/emacsen-install

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2 # /usr/lib/emacsen-common/packages/install/mu-cite
3 set -e
4
5 FLAVOR=$1
6 PACKAGE=mu-cite
7
8 ELCDIR=/usr/share/$FLAVOR/site-lisp/$PACKAGE
9 ELDIR=/usr/share/$PACKAGE
10 ELCSTAMP=$ELCDIR/compile-stamp
11
12 case $FLAVOR in
13 *xemacs*|emacs2[0-3]|emacs1?|mule2)
14 exit 0
15 ;;
16 esac
17
18 if [scip-shell system . . `[`. ! -f "/usr/share/$FLAVOR/site-lisp/apel/poem.elc" ]; then exit 0; fi
19 if [scip-shell system . . `[`. ! -f "/usr/share/$FLAVOR/site-lisp/flim/std11.elc" ]; then exit 0; fi
20
21 if [scip-shell system . . `[`. -f "$ELCSTAMP" ]; then
22 if [scip-shell system . . `[`. -z "`findscip-shell system . . find. "$ELDIR/$PACKAGE.el" -newer "$ELCSTAMP"`" ]; then
23 echoscip-shell system . . echo. "install/$PACKAGE: already byte-compiled for $FLAVOR, skipped"
24 exit 0
25 fi
26 rmscip-shell system . . rm. -f "$ELCSTAMP"
27 fi
28
29 LOG="$ELCDIR/CompilationLog"
30 echoscip-shell system . . echo. "install/$PACKAGE: byte-compiling for $FLAVOR"
31
32 cd "$ELDIR"
33 LINKS=`echoscip-shell system . . echo. *.el`
34 if [scip-shell system . . `[`. ! -d "$ELCDIR" ]; then
35 mkdirscip-shell system . . mkdir. "$ELCDIR"
36 chmodscip-shell system . . chmod. 755 "$ELCDIR"
37 fi
38
39 cd "$ELCDIR"
40 TOELDIR=../../../$PACKAGE
41 rmscip-shell system . . rm. -f *.elc __myinit.el
42 for f in $LINKS; do
43 lnscip-shell system . . ln. -sf "$TOELDIR/$f" .
44 done
45
46 catscip-shell system . . cat. > __myinit.el << EOF
47 (setq inhibit-automatic-native-compilation t)
48 (setq native-comp-deferred-compilation nil)
49 (setq comp-enable-subr-trampolines nil)
50 (setq load-path (cons "/usr/share/$FLAVOR/site-lisp/apel" load-path))
51 (setq load-path (cons "/usr/share/$FLAVOR/site-lisp/flim" load-path))
52 (setq load-path (cons "." load-path))
53 (setq byte-compile-warnings nil)
54 EOF
55
56 FILES=`echoscip-shell system . . echo. *.el | sedscip-shell system . . sed. 's/mu-bbdb.el//'`
57 FLAGS="-q -no-site-file -batch -l __myinit.el -f batch-byte-compile"
58 echoscip-shell system . . echo. "$FLAVOR" $FLAGS $FILES > "$LOG"
59 set +e
60 "$FLAVOR" $FLAGS $FILES >> "$LOG" 2>&1
61 if [scip-shell system . . `[`. $? -ne 0 ]; then catscip-shell system . . cat. "$LOG"; exit 1; fi
62 set -e
63 gzipscip-shell system . . gzip. -9f "$LOG"
64 chmodscip-shell system . . chmod. 644 *.elc
65
66 rmscip-shell system . . rm. -f __myinit.el*
67
68 if [scip-shell system . . `[`. -f /usr/share/emacsen-common/debian-startup.elscip-shell filesystem . . `/usr/share/emacsen-common/debian-startup.el`. ] && \
69 [ ! -f "/etc/$FLAVOR/site-start.d/51$PACKAGE.el" ] && \
70 [ -f "/etc/emacs/site-start.d/51$PACKAGE.el" ] && \
71 [ -d "/etc/$FLAVOR/site-start.d" ]; then
72 lnscip-shell system . . ln. -sf "../../emacs/site-start.d/51$PACKAGE.el" "/etc/$FLAVOR/site-start.d/51$PACKAGE.el"
73 fi
74
75 touchscip-shell system . . touch. "$ELCSTAMP"
76 exit 0