From afd0ba336d2e0a4e16cbc9631d25865f32350b53 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 8 Jan 2018 21:00:30 -0500 Subject: [PATCH] Add optional argument to specify build directory. --- etc/check-crefs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/etc/check-crefs b/etc/check-crefs index 50e62cd35..b4f9cae5e 100755 --- a/etc/check-crefs +++ b/etc/check-crefs @@ -1,8 +1,15 @@ #!/bin/bash +# Usage: check-crefs [BUILD-DIR] +# If no BUILD-DIR, uses dir named "build" in root. + set -e -cd "$(pwd)"/"$(dirname "${0}")"/../build +if (( ${#} > 0 )); then + cd "${1}" +else + cd "$(dirname "${0}")"/../build +fi for f in $(find * -type f -name \*-unx.crf); do echo '>>>>' "${f}" cat "${f}" -- 2.25.1