#!/bin/sh -e
if [ $# != 1 ] ; then
    echo "Usage: $0 <trackfile>"
    exit 1
fi
chmod 644 $1
STAMP=`grep "<time>" $1 | tail -n 1 | \
       sed -e 's?^.*<time>\([-0-9]\+\)[A-Z]*\([0-9:]\+\)[A-Z]*</time>.*$?\1\2?' \
           -e 's/-//g' -e 's/://' -e 's/:/./'`
touch -t $STAMP $1
