el/dot-emacs.el: Fix stupid typo.
[profile] / bin / mdw-sbuild
index 11c6c16..5630dab 100755 (executable)
@@ -33,8 +33,8 @@ fail_usage () { usage >&2; exit 1; }
 ###--------------------------------------------------------------------------
 ### Parse options.
 
-bogusp=nil noactp=nil
-unset buildopts keyid
+bogusp=nil noactp=nil signp=nil
+unset buildopts
 while getopts "haik:nt:" opt; do
   case $opt in
     h)
@@ -99,7 +99,13 @@ rc=$?; set -e
 rsync -a "$host:$builddir/" ./
 case $rc in 0) ;; *) exit $rc ;; esac
 
-## Maybe sign the result.
-case $?,${keyid+t},$noactp in
-  0,t,nil) debsign -k"$keyid" "${pkg}_${ver}_"*.changes ;;
+## Merge the change files together, and maybe sign the result.
+chchch=${pkg}_${ver}_source.changes
+for i in "${pkg}_${ver}"_*.changes; do
+  case " $chchch " in *" $i "*) ;; *) chchch="$chchch $i" ;; esac
+done
+mergechanges -f $chchch
+rm $chchch
+case $signp in
+  t) debsign -k"$keyid" "${pkg}_${ver}_multi.changes" ;;
 esac