Add optional argument to specify build directory.
authorChris Hanson <org/chris-hanson/cph>
Tue, 9 Jan 2018 02:00:30 +0000 (21:00 -0500)
committerChris Hanson <org/chris-hanson/cph>
Tue, 9 Jan 2018 02:00:30 +0000 (21:00 -0500)
etc/check-crefs

index 50e62cd351a979d885cb6cba566949a89b42face..b4f9cae5e193dbce67cb833b6f9e0aa508dc5e43 100755 (executable)
@@ -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}"