X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=id-deb-build%2Fmkdist.sh;h=1506220c7f4351bca04a5d914199820dcd989036;hb=f23a522439343470ed9e0df49d4d1efe222b3e44;hp=2aa0d5a86eff633604c66e4f6dd1bcb22f5f9a32;hpb=ae26578d6d7d98c190dbe2b9b8c4db1c0c4df303;p=git-tools-moved-to-github.git diff --git a/id-deb-build/mkdist.sh b/id-deb-build/mkdist.sh index 2aa0d5a..1506220 100755 --- a/id-deb-build/mkdist.sh +++ b/id-deb-build/mkdist.sh @@ -15,13 +15,14 @@ else fi #we will keep this to get the project name -DEBCHANGELOG=debian/changelog if [ "x$NAME" != x ]; then echo "Got name $NAME from IDMETA file" +elif test -f debian/control; then + NAME=`awk '/Source:/ {print $2}' debian/control` + echo "Warning: assuming name $NAME from debian/control" else - NAME=`head -1 $DEBCHANGELOG|sed 's/ .*//g'` - echo "Warning: assuming name $NAME from $DEBCHANGELOG" + die "No debian/control and no NAME in IDMETA" fi if [ "x$2" != x ]; then @@ -32,9 +33,8 @@ fi if [ "x$VERSION" != x ]; then echo "Got version $VERSION from IDMETA file" else - FULLVERSION=`head -1 $DEBCHANGELOG|sed 's/.*(//g'|sed 's/).*//g'` - VERSION=`echo $FULLVERSION|sed 's/-.*//g'` - echo "Warning: assuming version $VERSION from $DEBCHANGELOG" + echo "No VERSION in IDMETA" + exit 1 fi if [ "x$1" != x ]; then