#!/bin/sh # Copyright 2011 Paul Wise # Released under the MIT/Expat license, see doc/COPYING # Extract the logo URLs from the wiki text # # Usage # wiki-text-to-logo set -e if test -f "$1" ; then sed -r -n -e 's/^[^{]*\{\{([^{}|]+)[^{}]*\}\}[^}]*.*$/\1/p' "$1" | head -n1 > "$2" find "$2" -empty -delete fi