From 14f9a937965edcda4b2f253bc6332e11aeed40ab Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 11 Nov 2015 09:42:33 -0800 Subject: [PATCH] Update bashbrew to fail more directly on missing library files This works around the busybox "readlink" implementation being slightly different from GNU's which would cause failures without any error output. --- bashbrew.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bashbrew.sh b/bashbrew.sh index 2851758..3b4b7ed 100755 --- a/bashbrew.sh +++ b/bashbrew.sh @@ -186,6 +186,12 @@ for repoTag in "${repos[@]}"; do repoFile="$library/$repo" fi + if [ ! -f "$repoFile" ]; then + echo >&2 "error: '$repoFile' does not exist!" + didFail=1 + continue + fi + repoFile="$(readlink -f "$repoFile")" echo "$repoTag ($repoFile)" >> "$logDir/repos.txt"