Duplicate existing pkgsrc MESSAGE files when already existing

This commit is contained in:
Pierre Pronchery 2012-10-08 22:40:16 +00:00
parent 72f8dc295f
commit 68cb569320

View File

@ -32,6 +32,7 @@ VERBOSE=0
VERSION=
#executables
CKSUM="cksum"
CP="cp"
CUT="cut"
DCH="dch"
DPKG_BUILDPACKAGE="dpkg-buildpackage -rfakeroot"
@ -566,6 +567,15 @@ _package_pkgsrc()
return 2
fi
#MESSAGE
_info "Creating $pkgname/MESSAGE..."
_pkgsrc_message "$pkgname"
if [ $? -ne 0 ]; then
$DEBUG $RM -r -- "$pkgname"
_error "Could not create $pkgname/MESSAGE"
return 2
fi
#PLIST
_info "Creating $pkgname/PLIST..."
tmpdir="$PWD/$pkgname/destdir"
@ -705,6 +715,15 @@ EOF
echo '.include "../../mk/bsd.pkg.mk"'
}
_pkgsrc_message()
{
[ $# -eq 1 ] || return 1
pkgname="$1"
[ ! -f "$PKGSRC_ROOT/wip/$pkgname/MESSAGE" ] && return 0
$DEBUG $CP -- "$PKGSRC_ROOT/wip/$pkgname/MESSAGE" "$pkgname/MESSAGE"
}
#debug
_debug()