#!/bin/bash

here=`dirname $0`

for i in $@; do
  directory=`dirname $i`
  filename=`basename $i`
  cat $here/make_shadow.py | sed -e "s#_DIR_#$directory#g" | sed -e "s#_FILE_#$filename#g";
done > /tmp/bigmake

echo "pdb.gimp_quit(1)" >> /tmp/bigmake

cat /tmp/bigmake | gimp-console --batch-interpreter python-fu-eval -b -

rm /tmp/bigmake
