#!/bin/bash
set -e
set -x

pkg="rsem"


if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

cp -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP

cd $AUTOPKGTEST_TMP

tar -C . -xzf *.tar.gz

rsem-prepare-reference \
		       --transcript-to-gene-map mouse_ref_mapping.txt \
   		       mouse_ref.fa mouse_ref
