summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 04:23:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 04:23:09 +0000
commit5b4c8b157ba7dcc4c3894cce1017e25dcf0d0988 (patch)
tree2213bfe46791e9fb08b0b9ed58b68b3747f2de4d /bin
parentUpdating. (diff)
downloadprogress-linux-tools-5b4c8b157ba7dcc4c3894cce1017e25dcf0d0988.tar.xz
progress-linux-tools-5b4c8b157ba7dcc4c3894cce1017e25dcf0d0988.zip
Updating.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/linux-pupdate.sh60
1 files changed, 60 insertions, 0 deletions
diff --git a/bin/linux-pupdate.sh b/bin/linux-pupdate.sh
new file mode 100755
index 0000000..7d17e8c
--- /dev/null
+++ b/bin/linux-pupdate.sh
@@ -0,0 +1,60 @@
+#!/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/config.defines.dump DEB/control* DEB/linux-image* DEB/linux-headers* DEB/rules.gen debian
+ cp -f DEB/tests/control debian/tests
+
+ 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