#!/bin/sh set -e for DSC in ${@} do pupdate.sh "${DSC}" || true git commit -a git checkout debian cp -a debian DEB git checkout progress-linux rm -rf debian/build debian/linux-image* debian/linux-headers* cp -f DEB/control* DEB/linux-image* DEB/linux-headers* DEB/rules.gen debian cp -f DEB/tests/control debian/tests if [ -e DEB/config.defines.dump ] then # linux 6.6 or older cp -f DEB/config.defines.dump debian fi if git slog | grep -qs 'Setting abiname to [0-9]*' then # debian 12 or older vi debian/config/defines fi rm -rf DEB git add . -f git commit -a -s -S --amend -C HEAD if git slog | grep -qs 'Setting abiname to [0-9]*' then # debian 12 or older ABINAME_COMMIT="$(git slog | grep -m1 'Setting abiname to ' | awk '{ print $1 }')" if [ -z "${ABINAME_COMMIT}" ] then echo "error - could not find abiname commit" exit 1 fi git cherry-pick ${ABINAME_COMMIT} || ( vi debian/config/defines && git commit -a ) git commit -a -s -S -C HEAD --amend --reset-author --allow-empty else # debian 13 or newer echo "trixie or newer: no need to manually set abiname" fi git-debian-changelog HEAD~3 git-progress-linux-release git diff debian..HEAD rm -f debian/linux-image-* debian/linux-headers-* debian/rules debian/control || true git add . -f rm -rf debian/lib/python/debian_linux/__pycache__ git commit -a -s -S -m "Regenerating debian files." git rebase -i HEAD~3 git reset HEAD~ git-progress-linux-release done