X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a7f9e978a4e45440a965d94ff849f59508a5456a..490aaa38ccb260f94e2ee25e7c6a50c982da35ae:/build/go-python-package-scripts/postinst diff --git a/build/go-python-package-scripts/postinst b/build/go-python-package-scripts/postinst index 095872fe24..ab2568ab9b 100755 --- a/build/go-python-package-scripts/postinst +++ b/build/go-python-package-scripts/postinst @@ -3,11 +3,11 @@ # # SPDX-License-Identifier: AGPL-3.0 +set -e + # Detect rpm-based systems: the exit code of the following command is zero # on rpm-based systems -/usr/bin/rpm -q -f /usr/bin/rpm >/dev/null 2>&1 - -if [ "$?" = "0" ]; then +if /usr/bin/rpm -q -f /usr/bin/rpm >/dev/null 2>&1; then # Red Hat ("%{...}" is interpolated at package build time) pkg="%{name}" pkgtype=rpm @@ -20,7 +20,6 @@ else prefix=/usr fi -set -e case "${pkgtype}-${1}" in deb-configure | rpm-1) dest_dir="/lib/systemd/system"