[Piuparts-commits] [piuparts] 01/01: scripts-log-alternatives: do not fail if no alternatives were logged
Holger Levsen
holger at layer-acht.org
Tue Mar 7 19:52:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit b0eee0c77756d1b532fb2b03d775a452046fd741
Author: Andreas Beckmann <anbe at debian.org>
Date: Tue Mar 7 19:57:06 2017 +0100
scripts-log-alternatives: do not fail if no alternatives were logged
Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
.../scripts-log-alternatives/post_install_log_alternatives | 8 ++++++--
.../scripts-log-alternatives/pre_install_log_alternatives | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/custom-scripts/scripts-log-alternatives/post_install_log_alternatives b/custom-scripts/scripts-log-alternatives/post_install_log_alternatives
index be99f18..9f9d325 100755
--- a/custom-scripts/scripts-log-alternatives/post_install_log_alternatives
+++ b/custom-scripts/scripts-log-alternatives/post_install_log_alternatives
@@ -1,7 +1,11 @@
#!/bin/sh
+set -e
[ ! -e /usr/bin/update-alternatives.orig ] && exit 0
rm /usr/bin/update-alternatives
dpkg-divert --rename --remove /usr/bin/update-alternatives
-cat /tmp/log-alternatives.log
-rm /tmp/log-alternatives.log
+
+if [ -f /tmp/log-alternatives.log ]; then
+ cat /tmp/log-alternatives.log
+ rm /tmp/log-alternatives.log
+fi
diff --git a/custom-scripts/scripts-log-alternatives/pre_install_log_alternatives b/custom-scripts/scripts-log-alternatives/pre_install_log_alternatives
index 0dcf6a2..c961920 100755
--- a/custom-scripts/scripts-log-alternatives/pre_install_log_alternatives
+++ b/custom-scripts/scripts-log-alternatives/pre_install_log_alternatives
@@ -1,4 +1,5 @@
#!/bin/sh
+set -e
# Do nothing if the script already ran.
# The pre_install step can be run multiple times.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list