D7net Mini Sh3LL v1
OFF | cURL : OFF | WGET : ON | Perl : ON | Python : OFF Directory (0755) : /var/www/../lib/dpkg/info/ |
|
Current File : /var/www/../lib/dpkg/info/git.preinst |
#!/bin/sh
set -e
# Automatically added by dh_installdeb/12.10ubuntu1
dpkg-maintscript-helper rm_conffile /etc/bash_completion.d/git 1:1.8.0-1~ -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/12.10ubuntu1
dpkg-maintscript-helper rm_conffile /etc/emacs/site-start.d/50git-core.el 1:1.7.4.1-2~ -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/12.10ubuntu1
dpkg-maintscript-helper dir_to_symlink /usr/share/doc/git/contrib/hooks ../../../git-core/contrib/hooks 1:1.7.7-1 -- "$@"
# End automatically added section
# Automatically added by dh_installdeb/12.10ubuntu1
dpkg-maintscript-helper dir_to_symlink /usr/share/doc/git/contrib/emacs ../../../git-core/emacs 1:1.7.4~rc1-0.1 -- "$@"
# End automatically added section
# /var/cache/git/ -> /var/lib/git/ transition
if test "$1" = upgrade &&
dpkg --compare-versions "$2" lt-nl '1:1.8.4~rc0-1'; then
mkdir -m 755 -p /var/lib/git
(
cd /var/lib/git
for target in ../../cache/git/*; do
if ! test -L "$target" && ! test -e "$target"; then
continue
fi
link=${target#../../cache/git/}
if ! test -L "$link" && ! test -e "$link"; then
ln -s "$target" "$link"
fi
done
)
fi
# A previous version of the /var/lib/git/ transition code
# left behind a symlink '/var/lib/git/*' -> '../../cache/git/*'.
if test "$1" = upgrade &&
dpkg --compare-versions "$2" eq '1:1.8.4~rc0-1' &&
test -L '/var/lib/git/*'; then
target=$(readlink '/var/lib/git/*')
if test "$target" = '../../cache/git/*'; then
rm -f '/var/lib/git/*'
fi
fi
# Git versions before 1.7.7-2 kept about 100 hard links to
# /usr/lib/git-core/git at /usr/lib/git-core/git-* to avoid
# wasting time resolving a symlink when old scripts call "git
# foo" as git-foo. Btrfs doesn't like to have more than 130 or
# so links to a single inode in a given directory. dpkg versions
# 1.16.1 and later temporarily double the number of hard links to
# an inode when upgrading a package.
#
# Replace the hard links with symlinks _before_ upgrading to
# avoid trouble.
#
# For added fun, coreutils mv will not replace a file by a
# symlink to the same inode (bug #654666). We give
# /usr/lib/git-core/git its own inode to work around that.
if test "$1" = upgrade &&
dpkg --compare-versions "$2" lt-nl '1:1.7.7-2'; then
refinode=$(stat -c%i /usr/lib/git-core/git-add)
rm -f /usr/lib/git-core/git.tmp
cp -p /usr/lib/git-core/git /usr/lib/git-core/git.tmp
mv -f /usr/lib/git-core/git.tmp /usr/lib/git-core/git
for f in /usr/lib/git-core/*; do
test "$f" != /usr/lib/git-core/git &&
test "$f" != /usr/lib/git-core/git-add || continue
rm -f "$f.tmp"
inode=$(stat -c%i "$f")
test "$inode" = "$refinode" || continue
ln -s git "$f.tmp"
mv -f "$f.tmp" "$f"
done
fi
AnonSec - 2021 | Recode By D7net