#!/bin/sh

if [ $# -lt 1 ] ; then
    echo "Usage: $0 <orig-tar>"
    exit 1
fi

if [ ! -f $1 ] ; then
    echo "$0: File $1 does not exist"
    exit 1
fi

echo "Make sure we use sid config"
ln -sf .gbp.conf.sid ~/.gbp.conf

# sometimes (for instance for emboss /tmp is to small - so set TMPDIR
TMPDIR=/var/tmp gbp import-orig --pristine-tar --no-interactive $1

echo "If it fails use '--merge-mode=replace'"
