#!/bin/bash set -e V=$(grep -i "project.*VERSION" CMakeLists.txt | sed 's/.* \([0-9.]*\).*)/\1/') D=$(mktemp -d "/tmp/myx-cmake.XXXXXX") mkdir -p "$D/myx-cmake-$V" cp -ap CMakeLists.txt MyxCMake "$D/myx-cmake-$V" pushd "$D" tar Jcf "myx-cmake_${V}.orig.tar.xz" "myx-cmake-$V" popd cp -ap debian "$D/myx-cmake-$V" pushd "$D/myx-cmake-$V" dch -D unstable -v "${V}-1" -m "New version." debuild popd