Generate debian/changelog from IDMETA SA-616
[git-tools-moved-to-github.git] / id-deb-build / mkdist.sh
index 52ef1e9..40a99ca 100755 (executable)
@@ -15,15 +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 $DEBCHANGELOG; then
-  NAME=`head -1 $DEBCHANGELOG|sed 's/ .*//g'`
-  echo "Warning: assuming name $NAME from $DEBCHANGELOG"
+elif test -f debian/control; then
+  NAME=`awk '/Source:/ {print $2}' debian/control`
+  echo "Warning: assuming name $NAME from debian/control"
 else
-  die "No $DEBCHANGELOG and no NAME in IDMETA"
+  die "No debian/control and no NAME in IDMETA"
 fi
 
 if [ "x$2" != x ]; then