From 69ebecaf40f76241c682f2783ed6bd3c81f2eb49 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Wed, 27 Nov 2019 11:40:24 -0500 Subject: [PATCH] display instructions if gyb is missing --- updateSecrets.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/updateSecrets.sh b/updateSecrets.sh index d5fa38cc9..9033d9d8d 100755 --- a/updateSecrets.sh +++ b/updateSecrets.sh @@ -1,7 +1,12 @@ #!/bin/bash -find . -name '*.gyb' | \ - while read file; do \ - echo "running ${file%.gyb}"; \ - gyb --line-directive '' -o "${file%.gyb}" "$file"; \ +if [ ! $(type -P "gyb") ]; then + echo "gyb not installed. Install via: brew install nshipster/formulae/gyb" + exit 1 +fi + +find . -name '*.gyb' | + while read file; do + echo "running ${file%.gyb}"; + gyb --line-directive '' -o "${file%.gyb}" "$file"; done \ No newline at end of file