#!/bin/sh [ -z "$1" ] || cd "$1" tac .rev | perl -ne 'if(m!<version>([^<>]*)</version>!){print $1;exit 0}'