File: auctex.bug-script.eperl

package info (click to toggle)
auctex 11.91-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,952 kB
  • sloc: lisp: 45,907; makefile: 890; sh: 112; perl: 90
file content (92 lines) | stat: -rw-r--r-- 2,926 bytes parent folder | download | duplicates (3)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<: # ePerl source file :>//
#! /bin/bash
#
# bug reporting script for the Debian auctex package
#
<:
  open (my $copyright, "< COPYRIGHT");
  while (<$copyright>) {print '#' . (/^$/ ? "\n" : " $_")};
  close $copyright;
:>//

set -e

EMACS_COMMAND='
(let ((start "Emacs")
      (stop "\n-- \n"))
  (TeX-submit-bug-report)
  (let ((a (search-forward start nil t))
	(b (search-forward stop nil t)))
    (princ (concat
	    (buffer-substring
	     (if a (- a (length start)) (point))
	     (if b (- b (length stop)) (point-max)))))))'

cat >&3 <<EOF
========================================================================
Content of '/usr/share/auctex'
------------------------------------------------------------------------
EOF
find 2>/dev/null /usr/share/auctex -type f -print0 \
    | xargs --null --no-run-if-empty md5sum | sort --key=2,2 >&3
cat >&3 <<EOF
------------------------------------------------------------------------
EOF

<: # Default flavors: only GNU/Emacsen, XEmacs comes with its own AUCTeX :>//
FLAVORS=${*:-"emacs"}

for FLAVOR in ${FLAVORS}; do
    if [ -x /usr/bin/${FLAVOR} ]; then
	cat >&3 <<EOF
Collecting package info for Emacs flavor '${FLAVOR}':
------------------------------------------------------------------------
EOF
	${FLAVOR} </dev/null 2>/dev/null >&3 \
	    --no-site-file --no-init-file --batch \
	    --eval "(require 'tex-site)" --eval "$EMACS_COMMAND"
	cat >&3 <<EOF
------------------------------------------------------------------------
Collecting system info for Emacs flavor '${FLAVOR}':
------------------------------------------------------------------------
EOF
	${FLAVOR} </dev/null 2>/dev/null >&3 \
	    --no-init-file --batch --eval "$EMACS_COMMAND"
	cat >&3 <<EOF
------------------------------------------------------------------------
Collecting user info for Emacs flavor '${FLAVOR}':
------------------------------------------------------------------------
EOF
	${FLAVOR} </dev/null 2>/dev/null >&3 \
	    --batch --eval "$EMACS_COMMAND"
	cat >&3 <<EOF
------------------------------------------------------------------------
Content of '/usr/share/${FLAVOR}/site-lisp/auctex'
------------------------------------------------------------------------
EOF
	command ls >&3 --almost-all --sort=version --format=long \
	    /usr/share/${FLAVOR}/site-lisp/auctex
	LOG=$(ls /usr/share/${FLAVOR}/site-lisp/auctex/CompilationLog*)
	cat >&3 <<EOF
------------------------------------------------------------------------
Content of '${LOG}':
------------------------------------------------------------------------
EOF
	case ${LOG} in
	    (*.gz) zcat >&3 ${LOG} ;;
	    (*) cat >&3 ${LOG} ;;
	esac
	cat >&3 <<EOF
========================================================================
EOF
    fi
done
<:
# local variables:
# mode: shell-script
# ispell-local-dictionary: "american"
# ispell-check-comments: exclusive
# end:
#
# LocalWords:  Emacsen AUCTeX ePerl auctex
:>//