zeek/testing/scripts/spicy-version
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

14 lines
313 B
Bash
Executable File

#! /bin/sh
#
# Two usages:
# - Without argument, prints out the numerical Spicy version.
# - With a numerical Spicy version in $1, exit with true iff we have at least that version.
version=$(spicy-config --version-number)
if [ $# = 0 ]; then
echo "${version}"
else
test "${version}" -ge "$1"
fi