From: Colin Watson Date: Tue, 15 Apr 2008 15:51:07 +0000 (+0000) Subject: confine searches to first line; allow restricting to just Debian or just Ubuntu X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?p=bin.git;a=commitdiff_plain;h=f93ca66f0cf1c01bac169d1e17f6c59fff959094;hp=e2860cbc5d807c601389a2038a80b745f2a42361 confine searches to first line; allow restricting to just Debian or just Ubuntu --- diff --git a/unreleased-packages b/unreleased-packages index 9877ad7..fac1e21 100755 --- a/unreleased-packages +++ b/unreleased-packages @@ -1,3 +1,13 @@ #! /bin/sh -grep 'UNRELEASED;' ~/src/debian/*/*/debian/changelog ~/src/debian/*/trunk/*/debian/changelog \ - ~/src/ubuntu/*/*/debian/changelog +paths= +if [ -z "$1" ] || [ "$1" = debian ]; then + paths="${paths:+$paths }$HOME/src/debian/*/*/debian/changelog $HOME/src/debian/*/trunk/*/debian/changelog" +fi +if [ -z "$1" ] || [ "$1" = ubuntu ]; then + paths="${paths:+$paths }$HOME/src/ubuntu/*/*/debian/changelog" +fi +for path in $paths; do + if firstline="$(head -n1 "$path" | grep -h 'UNRELEASED;')"; then + echo "$path:$firstline" + fi +done