File: git-el.emacsen-install

package info (click to toggle)
git 1:2.11.0-3+deb9u4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 37,344 kB
  • sloc: ansic: 175,978; sh: 154,654; perl: 29,746; tcl: 21,549; python: 6,781; makefile: 3,405; lisp: 1,786; php: 120; asm: 98; csh: 45
file content (33 lines) | stat: -rwxr-xr-x 995 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# Based on /usr/share/doc/emacsen-common/sample-package-install-foo.gz.
#
# Unlike the example, we place symlinks to the elisp source alongside
# the compiled bytecode, so the .el source is available to the various
# Emacs help tools.  Putting .el and .elc files in the same directory
# keeps "list-load-path-shadows" happy.

set -e
FLAVOR=$1
el_files="git.el git-blame.el"
el_dir=/usr/share/git-core/emacs
elc_dir=/usr/share/$FLAVOR/site-lisp/git

# The emacs startup file looks for these files in
# /usr/share/${debian-emacs-flavor}/site-lisp/git.
# Installing to the generic /usr/share/emacs/site-list/git would be
# pointless.
[ "$FLAVOR" != emacs ] || exit 0

printf 'install/git: Handling install of emacsen flavor %s\n' "$FLAVOR"
[ -d "$elc_dir" ] || mkdir "$elc_dir"
(
  cd $elc_dir
  for i in $el_files
  do
    ln -sf $el_dir/$i $i
  done

  printf 'install/git: Byte-compiling for %s\n' "$FLAVOR"
  set -x
  $FLAVOR -batch -q -no-site-file -f batch-byte-compile $el_files
)