From f6b1ff0409e14b0e55e43a92fbce3b99d47711ee Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Mon, 16 Nov 2020 04:53:47 +0000 Subject: [PATCH] debian: Avoid looking like a set -e is missing The exit code for an if is the final command's so single-command if statements are safe. However, this is rather subtle and could easily be accidentally overlooked when making future changes. We could add a set -e to be defensive, but instead let's use the idiomatic way of doing one-line if statements in shell that always yield the right exit code. --- contrib/debian/rules | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/debian/rules b/contrib/debian/rules index 1d4b1ceab..06dfcc63b 100755 --- a/contrib/debian/rules +++ b/contrib/debian/rules @@ -69,9 +69,7 @@ override_dh_install: sed -i 's,wheel,sudo,' ./debian/tmp/usr/share/polkit-1/rules.d/org.freedesktop.fwupd.rules dh_install #install the EFI binaries if needed - if [ -d debian/tmp/usr/libexec/fwupd/efi/ ]; then \ - dh_install -pfwupd usr/libexec/fwupd/efi; \ - fi + [ ! -d debian/tmp/usr/libexec/fwupd/efi/ ] || dh_install -pfwupd usr/libexec/fwupd/efi dh_missing -a --fail-missing #this is placed in fwupd-tests