chiark / gitweb /
confine searches to first line; allow restricting to just Debian or just Ubuntu
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Tue, 15 Apr 2008 15:51:07 +0000 (15:51 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Tue, 15 Apr 2008 15:51:07 +0000 (15:51 +0000)
unreleased-packages

index 9877ad77c262387283c58bb64f4ef8001855febb..fac1e21d842dfdff8911cbc8052183ab8bdcfadc 100755 (executable)
@@ -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