pkg://vim-common_7.0-122+1etch3_i386.deb:181252/preinst
info downloads
#!/bin/bash -e
remove_symlink () {
if [ -L $1 ]; then
rm $1
fi
}
LASTVERSION="1:7.0-017+5"
prep_mv_conffile() {
CONFFILE="$1"
if [ -e "$CONFFILE" ]; then
md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
old_md5sum="`sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' $CONFFILE'{s/.* //;p}}\" /var/lib/dpkg/status`"
if [ "$md5sum" = "$old_md5sum" ]; then
rm -f "$CONFFILE"
fi
fi
}
case "$1" in
install)
if dpkg --compare-versions "$2" le "$LASTVERSION"; then
prep_mv_conffile "/etc/vim/virc"
fi
;;
upgrade)
remove_symlink /usr/share/doc/vim-common
if dpkg --compare-versions "$2" le "$LASTVERSION"; then
prep_mv_conffile "/etc/vim/virc"
fi
;;
esac
exit 0