tests: remove Bash dependency in favor of sh

The script works just fine with `sh`.

Also replace nonstandard `test` operator `==` with the standard `=`.

The other changes are mostly cosmetic.
This commit is contained in:
Mohammed Anas
2024-01-22 15:27:33 +00:00
parent 5a1253e37c
commit d3ec9a80d3

View File

@@ -1,12 +1,11 @@
#!/usr/bin/env bash
set -e
#!/bin/sh -e
if [ ! -x "$UDEV_HWDB" ]; then
echo "E: UDEV_HWDB (${UDEV_HWDB}) unset or not executable."
exit 1
fi
if [ "$UDEV_HWDB_CHECK_CONTENTS" == 1 ]; then
if [ "$UDEV_HWDB_CHECK_CONTENTS" = 1 ]; then
generated_rules=$(mktemp "${TMPDIR:-/tmp}/libfprint-XXXXXX.hwdb")
else
generated_rules=/dev/null