
# common stuff for 1.wb.distro.arch

if [ $# -ne 1 ]; then	
	echo "Syntax: $0 <sourcetar>"
	exit 1
fi

distro=`basename $0 | cut -d . -f 3`
sourcetarpath=$1
sourcetar=`basename $sourcetarpath`

edition=$(echo $sourcetar|cut -d- -f3)
version=$(echo $sourcetar|cut -d- -f4|sed -e s/.tar.gz//)

if test "$edition" != se -a "$edition" != oss; then
	echo "Source tar in invalid format"
	exit 1
fi

if test "$version" = ""; then
        echo "Syntax: $0 <sourcetar>"
	exit 1
fi

if ! test -f $sourcetarpath; then

echo "source tar for $version not found ($sourcetarpath)"
exit 1
fi
