#!/bin/sh . ./vars.sh.frag case "$(git rev-parse --abbrev-ref HEAD)" in pending-*) abort 1 "You are on a pending-release branch, $0 can only be run on another branch, like master";; esac if [ -n "$VER" ]; then if [ ! -d "$PWD/src/$PKGBASE" ]; then abort 1 "Using crate $CRATE with version $VER but default-version is not packaged." \ "Package that first by running this script without the explicit version." fi fi if [ ! -d "$PKGDIR/debian" ]; then mkdir -p "$PKGDIR/debian" echo 'overlay = "."' > "$PKGCFG" git add "$PKGDIR" fi if [ ! -f "$PKGDIR/debian/copyright" ]; then cat <<-eof > "$PKGDIR/debian/copyright" FIXME fill me in using ./copyright.debcargo.hint as a guide You may find the following useful too: Files: debian/* Copyright: 2018 Debian Rust Maintainers 2018 $DEBFULLNAME <$DEBEMAIL> The reason we don't put this in debian/copyright.debcargo.hint itself is documented here: https://salsa.debian.org/rust-team/debcargo-conf/issues/5 eof fi if [ -n "$VER" -a "$(sed -ne 's/^semver_suffix\s*=\s*//p' "$PKGCFG")" != "true" ]; then if grep -q semver_suffix "$PKGCFG"; then sed -i -e 's/^\(semver_suffix\s*=\s*\).*/\1true/' "$PKGCFG" else sed -i -e '1isemver_suffix = true' "$PKGCFG" fi fi run_debcargo if ! git diff --quiet -- "$PKGDIR_REL"; then read -p "Update wrote some changes to $PKGDIR_REL, press enter to git diff..." x || true git diff -- "$PKGDIR_REL" echo >&2 "-- end of git diff --" fi cat >&2 <&2 <