#! /bin/sh 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