diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 95a80c2989..09f996648a 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -40,8 +40,8 @@ jobs: usesh: true sync: rsync copyback: false - # We need jq and GNU coreutils to run show-utils.sh and bash to use inline shell string replacement - prepare: pkg install -y rust sudo jaq coreutils bash python3 + # We need bash to use inline shell string replacement + prepare: pkg install -y rust sudo jaq bash python3 run: | ## Prepare, build, and test sudo ln -s $(command -v jaq) /usr/local/bin/jq diff --git a/.github/workflows/openbsd.yml b/.github/workflows/openbsd.yml index 7312072881..d804d27e12 100644 --- a/.github/workflows/openbsd.yml +++ b/.github/workflows/openbsd.yml @@ -41,13 +41,13 @@ jobs: sync: rsync copyback: false mem: 4096 - # We need jq and GNU coreutils to run show-utils.sh and bash to use inline shell string replacement + # We need bash to use inline shell string replacement # Use sudo-- to get the default sudo package without ambiguity # Install rust and cargo from OpenBSD packages prepare: | # Clean up disk space before installing packages df -h - pkg_add curl sudo-- jq coreutils bash rust rust-clippy rust-rustfmt python3 + pkg_add curl sudo-- jq bash rust rust-clippy rust-rustfmt python3 rm -rf /usr/share/relink/* /usr/X11R6/* /usr/share/doc/* /usr/share/man/* & # Clean up package cache after installation pkg_delete -a & diff --git a/util/show-utils.sh b/util/show-utils.sh index c25be5968f..d0371a427a 100755 --- a/util/show-utils.sh +++ b/util/show-utils.sh @@ -3,7 +3,10 @@ set -eo pipefail # spell-checker:ignore (jq) deps startswith -cd -- "$(dirname -- "$0")/.." +# This script should not depend on external binaries to maximize portability if possible +dir="${0%/*}" +[ "$dir" = "$0" ] && dir="." +cd -- "$dir/.." # `jq` available? if ! jq --version 1>/dev/null 2>&1; then