#!/bin/sh -e

if [ "$ADTTMP" = "" ] ; then
  ADTTMP=`mktemp -d /tmp/python-pysam-test.XXXXXX`
fi
cd $ADTTMP
cp -a /usr/share/doc/python-pysam/tests/* $ADTTMP
gunzip -r *.py.gz \
        ex9_fail.bam.gz \
        ex9_nofail.bam.gz \
        example_empty_header.bam.gz \
        issue100.bam.gz
chmod u+x ./pysam_test_offline.py
./pysam_test_offline.py
