1
0
Fork 0

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.
This commit is contained in:
Florent Rougon 2020-07-03 14:21:05 +02:00
parent 25d9d717b5
commit cf95fc3530

View file

@ -319,11 +319,11 @@ function _gitDownload(){
local component="$1" local component="$1"
local clone_arg local clone_arg
if [ "$DOWNLOAD" != "y" ]; then if [[ "$DOWNLOAD" != "y" ]]; then
return return
fi fi
if [ -f "README" -o -f "README.txt" -o -f "README.rst" ]; then if [[ -d ".git" ]]; then
_printLog "$component: the repository already exists" _printLog "$component: the repository already exists"
else else
proto_spec=$(_gitProtoSpec "${REPO_PROTO[$component]}" \ proto_spec=$(_gitProtoSpec "${REPO_PROTO[$component]}" \