From cf95fc3530e9f1224d55e062321b315e7e550796 Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Fri, 3 Jul 2020 14:21:05 +0200 Subject: [PATCH] download_and_compile.sh: more reliable test in _gitDownload() Before this change, using OSG with download_and_compile.sh several times in the same directory would fail because the upstream repo for OSG has none of README, README.txt and README.rst at top-level (it has a README.md). Testing for the .git dir is definitely more reliable. --- download_and_compile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download_and_compile.sh b/download_and_compile.sh index 61a11a4..926a9e7 100755 --- a/download_and_compile.sh +++ b/download_and_compile.sh @@ -319,11 +319,11 @@ function _gitDownload(){ local component="$1" local clone_arg - if [ "$DOWNLOAD" != "y" ]; then + if [[ "$DOWNLOAD" != "y" ]]; then return fi - if [ -f "README" -o -f "README.txt" -o -f "README.rst" ]; then + if [[ -d ".git" ]]; then _printLog "$component: the repository already exists" else proto_spec=$(_gitProtoSpec "${REPO_PROTO[$component]}" \