#!/bin/bash

set -e

cd ` dirname "$0" `
ver=`grep Version: sbox.spec | awk ' { print $2 } ' `
cd ..
echo "Compressing the SBOX source code..."
tar --exclude sbox/.git -czf sbox-$ver.tar.gz sbox
rpmbuild -ta sbox-$ver.tar.gz
