diff --git a/build b/build index e17653a5fcf586b2c3ab814e3d424483bfe4daba..f0cbd45ae77ca0a7a3e195041cf6b4674b9af658 100755 --- a/build +++ b/build @@ -6,7 +6,19 @@ current_testing=buster -srcpkg=$(dpkg-parsechangelog -S Source) +if [ -z "$exp_srcpkg" ] +then + echo "Do not call this script directly, use the build-thunderbird or build-firefox scripts" + exit 1 +fi + +srcpkg=$(dpkg-parsechangelog -S Source 2> /dev/null) + +if [ -z "$srcpkg" ] +then + echo "This script is only meant to be run from a Debian source directory" + exit 1 +fi # Check that package matches called script if [ "$srcpkg" != $exp_srcpkg ]