18870: Updating params.local
[arvados.git] / build / go-python-package-scripts / prerm
index 26baa62aa1b74266fd853062e5cb25bb4ec6a93d..c0f45d60c698cb77f9c2472d7d18b5d3715b33c9 100755 (executable)
@@ -1,8 +1,13 @@
 #!/bin/sh
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
 
 set -e
 
-if [ "%{name}" != "%\{name\}" ]; then
+# Detect rpm-based systems: the exit code of the following command is zero
+# on rpm-based systems
+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