# They ship this as samhain-current.tar.gz, which contains
# samhain-$VERSION.tar.gz and samhain-$VERSION.tar.gz.asc.  So we tell the
# spell the regular source names, but use one extral $FULL_SOURCE var and this
# magic to tie the two together.

if [ -n "$FORCE_DOWNLOAD" ] ||
  [ ! -r $SOURCE_CACHE/$SOURCE ] || [ ! -r $SOURCE_CACHE/$SOURCE2 ]
then
  cd $SOURCE_CACHE                     &&
  rm -f $FULL_SOURCE $SOURCE $SOURCE2  &&
  wget $SOURCE_URL 2>&1                &&
  tar -xzf $FULL_SOURCE                &&
  rm $FULL_SOURCE
fi
