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 9877ad7..fac1e21 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