[pkg-java-scripts] 01/01: Made dh10.sh and stdver.sh idempotent

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Nov 7 10:59:13 UTC 2016


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository pkg-java-scripts.

commit 995c98bc4a38fe52b28b2994be63ffb24fa30a3d
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Mon Nov 7 11:57:41 2016 +0100

    Made dh10.sh and stdver.sh idempotent
---
 dh10.sh   | 7 +++++++
 stdver.sh | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/dh10.sh b/dh10.sh
index 0289168..53114f7 100755
--- a/dh10.sh
+++ b/dh10.sh
@@ -8,6 +8,13 @@ DH_LEVEL=10
 echo "Upgrading package to DH level $DH_LEVEL..."
 echo ""
 
+CURRENT_LEVEL=$(cat debian/compat)
+
+if [ $DH_LEVEL == $CURRENT_LEVEL ]; then
+    echo "DH level is up to date"
+    exit
+fi
+
 # Update debian/compat
 echo $DH_LEVEL > debian/compat
 
diff --git a/stdver.sh b/stdver.sh
index 4f7c95e..f517a89 100755
--- a/stdver.sh
+++ b/stdver.sh
@@ -8,6 +8,12 @@ STANDARDS_VERSION=3.9.8
 echo "Updating Standards-Version to $STANDARDS_VERSION..."
 echo ""
 
+grep -q "Standards-Version: $STANDARDS_VERSION" debian/control
+if [ $? -eq 0 ]; then
+    echo "Standards-Version is up to date"
+    exit
+fi
+
 # Update debian/control
 sed -i -e "s/Standards-Version:.*/Standards-Version: $STANDARDS_VERSION/g" debian/control
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/pkg-java-scripts.git



More information about the pkg-java-commits mailing list