genchangelog (473B)
1 #!/bin/sh 2 set -ef 3 4 ifs="$(echo)" 5 name=$1 6 vers=$2 7 dist=$3 8 desc="Upstream build" 9 auth="Kris Maglione <kris@suckless.org>" 10 date=$(date +'%a, %d %b %Y %T %z') 11 if hg root >/dev/null 2>&1; then 12 t() { hg log -r . --template "{$@}"; } 13 vers=$(t rev) 14 desc=$(t desc) 15 auth=$(t author) 16 date=$(t 'date|rfc822date') 17 fi 18 19 cat >debian/changelog.new <<! 20 $name ($vers) $dist; urgency=low 21 22 * $desc 23 24 -- $auth $date 25 26 $(cat debian/changelog) 27 ! 28 29 mv debian/changelog.new debian/changelog 30