#! /bin/sh

# Because thttpd does not allow symlinks to the outside,
# use a cgi to delegate.

file=`echo $QUERY_STRING | sed 's/.*file=\([^&;]*\).*/\1/'`

case $file in
erp5_banner.png) file=/usr/share/erp5cdtool/erp5_banner.png ;;
erp5-go.png) file=/usr/share/erp5cdtool/erp5-go.png ;;
hdd-format.png) file=/usr/share/erp5cdtool/hdd-format.png ;;
root-access.png) file=/usr/share/erp5cdtool/root-access.png ;;
*) exit 1 ;;
esac

echo 'Content-type: image/png'
echo ''
cat $file