diff options
author | Kerin Millar <kfm@plushkava.net> | 2024-08-13 13:44:19 +0100 |
---|---|---|
committer | Kerin Millar <kfm@plushkava.net> | 2024-08-22 20:37:43 +0100 |
commit | f36877ecf039c53ba43ca4ebcc8c465412d12fd6 (patch) | |
tree | 788f58761e63332b245210a6cc70673f8b55f744 | |
parent | Check for SRANDOM support in a safer manner (diff) | |
download | gentoo-functions-f36877ecf039c53ba43ca4ebcc8c465412d12fd6.tar.gz gentoo-functions-f36877ecf039c53ba43ca4ebcc8c465412d12fd6.tar.bz2 gentoo-functions-f36877ecf039c53ba43ca4ebcc8c465412d12fd6.zip |
Check for EPOCHREALTIME support in a safer manner
Given that the EPOCHREALTIME variable loses its special properties if
unset, to compare two expansions of it to one another ought to be more
robust.
Signed-off-by: Kerin Millar <kfm@plushkava.net>
-rw-r--r-- | functions.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/functions.sh b/functions.sh index a47bb2b..b19831d 100644 --- a/functions.sh +++ b/functions.sh @@ -940,7 +940,7 @@ _update_pid() _update_time() { # shellcheck disable=3028 - if [ "${BASH_VERSINFO:-0}" -ge 5 ]; then + if [ "${EPOCHREALTIME}" != "${EPOCHREALTIME}" ]; then # shellcheck disable=2034,3045 _update_time() { |