Report the packaging method guess on stdout

This commit is contained in:
Pierre Pronchery 2016-07-26 14:50:04 +02:00
parent 1134ec153d
commit 92aa970497

View File

@ -87,7 +87,7 @@ _deforaos_package()
_error "Could not determine the package name or version"
return $?
fi
[ -n "$METHOD" ] || _package_guess_method
[ -n "$METHOD" ] || METHOD=$(_package_guess_method)
[ -n "$LICENSE" ] || _package_guess_license
_package_guess_dependencies
[ -n "$EMAIL" ] || _package_guess_email
@ -217,19 +217,17 @@ _package_guess_license()
_package_guess_method()
{
#guess the packaging method
METHOD=
#debian
[ -f "/etc/debian_version" ] && METHOD="debian"
#pkgsrc
[ -d "/usr/pkg" ] && METHOD="pkgsrc"
if [ -z "$METHOD" ]; then
if [ -f "/etc/debian_version" ]; then
#debian
echo "debian"
elif [ -d "/usr/pkg" ]; then
#pkgsrc
echo "pkgsrc"
else
_error "Unsupported platform"
return $?
fi
return 0
}
_package_guess_name()