chiark / gitweb /
set -e to make it easier to kill this
[bin.git] / 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