#!/bin/sh
set -e

VERSION=$2
DIR=disruptor-${VERSION}
TAR=../disruptor_${VERSION}.orig.tar.xz

tar -xf $3
rm $3
XZ_OPT=--best tar -c -v -J -f $TAR \
    --exclude '*.jar' \
    --exclude '*.bat' \
    --exclude '.settings' \
    --exclude '.classpath' \
    --exclude '.project' \
    --exclude '.idea' \
    --exclude '*.iml' \
    $DIR
rm -Rf $DIR
