#!/bin/bash

set -e

if [ "`uname`" != "Linux" ]; then
    echo "makepip does not run on this OS"
    exit 2
fi

if [ "$#" -ne 0 ]; then
    echo "usage: makepip"
    exit 2
fi

VERSION=`./setup.py --version`
echo "makepip of ${VERSION}"

# make distribution
./setup.py sdist --dist-dir=.

# upload to pypi
twine upload duplicity-${VERSION}.tar.gz
