Fix infinite loop if repo clone is renamed (#75)

If the repo clone directory was not named esp32-arduino-lib-builder,
the script ran into an infinite loop.
This commit is contained in:
rtrbt 2023-07-18 13:54:57 +02:00 committed by GitHub
parent ace36a9bd9
commit 685f87db3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -359,7 +359,7 @@ for item; do
ipath="$item" ipath="$item"
fname=`basename "$ipath"` fname=`basename "$ipath"`
dname=`basename $(dirname "$ipath")` dname=`basename $(dirname "$ipath")`
if [[ "$fname" == "main" && "$dname" == "esp32-arduino-lib-builder" ]]; then if [[ "$fname" == "main" && "$dname" == $(basename "$PWD") ]]; then
continue continue
fi fi
while [[ "$dname" != "components" && "$dname" != "managed_components" && "$dname" != "build" ]]; do while [[ "$dname" != "components" && "$dname" != "managed_components" && "$dname" != "build" ]]; do