#! /usr/bin/env bash # $ build_ubuntu_source_package.sh [series [package-version]] # Generates a Debian source package suitable for upload to a Launchpad PPA. This # script only builds the package artifacts, it does NOT upload them. Use dput to # upload to a PPA after building. # See https://launchpad.net/~buildinspace/+archive/ubuntu/peru set -e # Change to the repo root directory. cd $(dirname "$BASH_SOURCE")/.. repo_root=`pwd` # Bail if the repo is dirty. if [ -n "$(git status --porcelain)" ] ; then git status echo "The source repository is dirty. Aborting." exit 1 fi # Get the series and package version from the command line, otherwise assume # "utopic" and version "1". Get the current version from the repo and append # package versioning information. Launchpad will reject changes to uploads for # the same version as derived from the source tarball. Bump the package version # to upload changes for the same version of peru. series="${1:-utopic}" version="$(