blob: 89e7492816e029a74597a89f8e001ab169ef82ab [file] [log] [blame]
Jonathan Niederc5be9622011-02-22 17:07:01 -06001#!/bin/sh
2set -e
Anders Kaseorg6e2a98f2016-08-19 21:55:48 -04003
4#DEBHELPER#
5
Jonathan Niederc5be9622011-02-22 17:07:01 -06006test "$1" = configure || exit 0
7/usr/lib/emacsen-common/emacs-package-install git
Jonathan Niederd8b6e882011-02-26 03:57:01 -06008
Jonathan Niedercfea6282011-03-09 17:07:29 -06009# Clean up after 1:1.7.4.1-1 through 1:1.7.4.1-3.
10! test -L /usr/share/git-core/emacs/emacs ||
11rm -f /usr/share/git-core/emacs/emacs
12! test -L /usr/share/doc/git/contrib/emacs.old ||
13rm -f /usr/share/doc/git/contrib/emacs.old
14
Jonathan Niederd8b6e882011-02-26 03:57:01 -060015# Replace the old /usr/share/doc/git/contrib/emacs directory
16# with a symlink.
Jonathan Nieder16ac8f02011-03-09 16:52:53 -060017test -z "$2" &&
18! test -L /usr/share/doc/git/contrib/emacs &&
Jonathan Niederd8b6e882011-02-26 03:57:01 -060019test -d /usr/share/doc/git/contrib/emacs || exit 0
Jonathan Nieder16ac8f02011-03-09 16:52:53 -060020
Jonathan Niederd8b6e882011-02-26 03:57:01 -060021if ! rmdir /usr/share/doc/git/contrib/emacs; then
22 echo Moving /usr/share/doc/git/contrib/emacs to emacs.old >&2
23 mv -f /usr/share/doc/git/contrib/emacs /usr/share/doc/git/contrib/emacs.old
24fi
25ln -s ../../../git-core/emacs /usr/share/doc/git/contrib/emacs