Commit 454cdc2670d3a143cf4f4804687662c7a723a812

Authored by samuel thibault
1 parent 20f5b7e4
Exists in master

prevent from running scripts erroneously

Showing 1 changed file with 13 additions and 1 deletions   Show diff stats
build
... ... @@ -6,7 +6,19 @@
6 6  
7 7 current_testing=buster
8 8  
9   -srcpkg=$(dpkg-parsechangelog -S Source)
  9 +if [ -z "$exp_srcpkg" ]
  10 +then
  11 + echo "Do not call this script directly, use the build-thunderbird or build-firefox scripts"
  12 + exit 1
  13 +fi
  14 +
  15 +srcpkg=$(dpkg-parsechangelog -S Source 2> /dev/null)
  16 +
  17 +if [ -z "$srcpkg" ]
  18 +then
  19 + echo "This script is only meant to be run from a Debian source directory"
  20 + exit 1
  21 +fi
10 22  
11 23 # Check that package matches called script
12 24 if [ "$srcpkg" != $exp_srcpkg ]
... ...