[X2Go-Commits] [x2gokdrive] 13/28: debian/rules: "a && b || c" doesn't really mean "if a then b else c", but something... more difficult: "c" does also run if "a" is false.
git-admin at x2go.org
git-admin at x2go.org
Sat Oct 26 23:00:31 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2gokdrive.
commit a2d76f169b8eb8647e86b93d84aa49564dd7829f
Author: Mihai Moldovan <ionic at ionic.de>
Date: Thu Oct 24 23:03:48 2019 +0200
debian/rules: "a && b || c" doesn't really mean "if a then b else c", but something... more difficult: "c" does also run if "a" is false.
Switch to a proper if-else construct.
---
debian/changelog | 3 +++
debian/rules | 7 +++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 4917e50..5d19d29 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,5 +22,8 @@ x2gokdrive (0.0.0.1-0x2go1) UNRELEASED; urgency=medium
+ Move options to the front of commands.
+ Drop useless use of cat.
+ Avoid backticks, use $() instead.
+ + "a && b || c" doesn't really mean "if a then b else c", but something...
+ more difficult: "c" does also run if "a" is false. Switch to a proper
+ if-else construct.
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Tue, 04 Jun 2019 14:10:43 +0200
diff --git a/debian/rules b/debian/rules
index d95c7ac..6624cbe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,8 +27,11 @@ override_dh_auto_configure:
# patch xorg-server build tree, so that it will build x2gokdrive
set -x; export XORG_UPSTREAM_VERSION=$$(grep AC_INIT $(CURDIR)/BUILD/xorg-server/configure.ac | sed -r 's/^AC_INIT[^,]*, ([^,]+),.*/\\1/') \
&& cd $(CURDIR)/BUILD/xorg-server \
- && test -d ../../patches.xorg/$$XORG_UPSTREAM_VERSION && QUILT_PATCHES=../../patches.xorg/$$XORG_UPSTREAM_VERSION/ quilt push -a \
- || ( set +x; echo "\n##################################################\nERROR: This X2Go KDrive version does not support\nbuilding against X.Org version $$XORG_UPSTREAM_VERSION.\n##################################################\n"; exit 1)
+ if [ -d ../../patches.xorg/$$XORG_UPSTREAM_VERSION ]; then \
+ QUILT_PATCHES=../../patches.xorg/$${XORG_UPSTREAM_VERSION}/ quilt push -a; \
+ else \
+ ( set +x; echo "\n##################################################\nERROR: This X2Go KDrive version does not support\nbuilding against X.Org version $$XORG_UPSTREAM_VERSION.\n##################################################\n"; exit 1); \
+ fi
# run autoreconf
cd $(CURDIR)/BUILD/xorg-server && autoreconf -vfi
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdrive.git
More information about the x2go-commits
mailing list