File update of Package fate.openSUSE_Backports_SLE-12-SP1

#!/bin/bash
#
#   ./update [ <branch> [ <repository or additional options to mkdist> ]]
#


set -e

# Trash the old tarball
rm -f fate-*.tar.bz2

if [ "$1" ]; then
	branch="$1"
	shift
else
	branch="master"
fi

if [ $# -eq 0 ]; then
	repo=gitlab@gitlab.suse.de:features/fate.git
else
	repo="$*"
fi
repo="$repo -b $branch"

./mkdist \
		--destdir . \
		--repotype git \
		--sign none \
		$repo

# git clone -l /suse/jplack/work-tools/FATE/fate -b save_attachment_fix

set -- fate-*.tar.bz2
if [ $# -ne 1 -o $1 = "fate-*.tar.bz2" ]; then
	echo "Too many tarballs" >&2
	ls fate-*.tar.bz2 >&2
	exit 1
fi

tarball=$1; shift
echo "Using tarball $tarball"

snapshot=`expr $tarball : "fate-\(.*\)\.tar.bz2"`
echo "Snapshot $snapshot"

sed -i "s:^%define snapshot .*:%define snapshot $snapshot:" fate.spec

osc ar
osc st

echo "Please edit the changelog and commit"
openSUSE Build Service is sponsored by