#!/bin/sh

echo "Exporting a new version of the vocabulary data from SVN..."

if ! svn cat svn://svn.debian.org/svn/debtags/vocabulary/trunk/debian-packages > vocabulary
then
	CACHED='/var/cache/debtags/debtags.alioth.debian.org_tags_vocabulary.gz'
	if [ -f $CACHED ]
	then
		echo "Falling back to locally cached copy in $CACHED"
		cp "$CACHED" vocabulary
	else
		echo "Cannot find a way to generate the file 'vocabulary'" >&2
		exit 1
	fi
fi
exit 0
