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.
This commit is contained in:
Jessica Clarke 2020-11-16 04:53:47 +00:00 committed by Mario Limonciello
parent e36ecb42ed
commit f6b1ff0409

View File

@ -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