#!/bin/bash -e

echo $*

VERSION=$2
FILE=$3
DIR=trident-$VERSION

TAR=../trident_$VERSION.orig.tar.gz

mkdir $DIR

unzip $FILE -d $DIR

# Some files don't have a copyright/license statement, so we remove
# those before making our orig.tar.gz
rm -r $DIR/src/test

tar -czf $TAR $DIR 
rm -r $DIR
rm $FILE
