Skip to content

Commit

Permalink
Accept globstar style globs
Browse files Browse the repository at this point in the history
  • Loading branch information
elopez committed Jun 16, 2022
1 parent bf0e6ce commit f3f803e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ install_solc()
popd >/dev/null
else
echo "[-] Target is neither a file nor a directory, assuming it is a path glob"
SOLCVER="$( while read -r file; do
SOLCVER="$( shopt -s globstar; for file in $TARGET; do
grep --no-filename '^pragma solidity' -r "$file" ; \
done < <(compgen -G "$TARGET" || true) | \
cut -d' ' -f3 | sort | uniq -c | sort -n | tail -1 | tr -s ' ' | cut -d' ' -f3)"
done | cut -d' ' -f3 | sort | uniq -c | sort -n | tail -1 | tr -s ' ' | cut -d' ' -f3)"
fi
SOLCVER="$(echo "$SOLCVER" | sed 's/[^0-9\.]//g')"

Expand Down

0 comments on commit f3f803e

Please sign in to comment.