# *************************
# *** Build deb Package *** 
# *************************

# Fail on first error:
set -e

# 1) In order to build a deb package, the following packages
# must be installed:

# sudo apt-get install python-stdeb fakeroot python-all

# 2) Update stdeb.cfg with the correct ubuntu release, e.g.,

# Suite: precise

# Get the directory where the script is stored:

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Get the current directory:
OLD_DIR=$(pwd)

# 3) Change to the main directory:
cd $DIR/..
 
# 4) Build the deb and dsc file in the folder deb_dist:

python setup.py --command-packages=stdeb.command bdist_deb

# 5) Return to the original directory:
cd $OLD_DIR
