File: emacsen.remove

package info (click to toggle)
calc 2.02f-28
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,856 kB
  • ctags: 2,397
  • sloc: lisp: 44,261; sh: 300; makefile: 99
file content (74 lines) | stat: -rw-r--r-- 1,784 bytes parent folder | download
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
#!/bin/sh
#                               -*- Mode: Sh -*- 
# emacsen-common-remove --- 
# Author           : Manoj Srivastava ( srivasta@tiamat.datasync.com ) 
# Created On       : Thu Oct 15 00:16:41 1998
# Created On Node  : tiamat.datasync.com
# Last Modified By : Manoj Srivastava
# Last Modified On : Sat Dec 13 15:50:51 2003
# Last Machine Used: glaurung.green-gryphon.com
# Update Count     : 10
# Status           : Unknown, Use with caution!
# HISTORY          : 
# Description      : 
# 
# arch-tag: 031a57b8-34c7-4b82-abdd-abbb1642259c


set -e

FLAVOUR=$1
PACKAGE="=P"
VERSION="=V"

if [ "X$FLAVOUR" = "X" ]; then
    echo Need argument to determin FLAVOUR of emacs;
    exit 1
fi

if [ "X$PACKAGE" = "X" ]; then
    echo Internal error: need package name;
    exit 1;
fi

if [ "X$VERSION" = "X" ]; then
    echo Internal error: need package version;
    exit 1;
fi


ELDIR=/usr/share/emacs/site-lisp/$PACKAGE
ELCDIR=/usr/share/$FLAVOUR/site-lisp/$PACKAGE/
INFO_FILES="/usr/info/${PACKAGE}.info.gz";

STARTDIR=/etc/$FLAVOUR/site-start.d
STARTFILE="$PACKAGE-init.el";

case $FLAVOUR in
    emacs19  | emacs20 | emacs | emacs-snapshot | emacs22)
	echo "remove/$PACKAGE: Ignoring emacsen flavor $FLAVOUR."       
        ;;
    emacs21)
        echo -n "remove/$PACKAGE: Removing for $FLAVOUR..."
	if [ -d $ELCDIR ]; then
	    rm -fr $ELCDIR
	fi
        if test -x /usr/sbin/install-info-altdir; then
            for infofile in $INFO_FILES; do
                install-info-altdir --quiet --remove \
                    --dirname=${FLAVOUR} $infofile
            done
        fi

        echo " done."   
        ;;
    *)
        echo "remove/$PACKAGE: Ignoring emacsen flavor $FLAVOUR."       
        ;;
esac

exit 0

### Local Variables:
### mode: shell-script
### End: