Skip to content

Instantly share code, notes, and snippets.

@ssm
Created October 27, 2012 13:51
Show Gist options
  • Save ssm/3964681 to your computer and use it in GitHub Desktop.
Save ssm/3964681 to your computer and use it in GitHub Desktop.
Building a debian source package (snapshot version)
#!/bin/sh
# 2012 Stig Sandbeck Mathisen <ssm@debian.org>
set -e
set -u
test "$(git status --porcelain | wc -l)" = "0" || {
echo "Aborting: Uncommitted changes in tree"
exit 1
}
this_branch=$(git branch | awk '$1 == "*" {print $2}')
git checkout -B snapshot-build
git dch -a --debian-branch=snapshot-build -S ${1:+--snapshot-number $1}
git commit -m 'Update changelog for snapshot build' -- debian/changelog
gitpkg snapshot-build
git checkout $this_branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment