mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
docs_version_pragma_check.sh: Switch to the new-style [[ ]] conditions
This commit is contained in:
parent
d8d5b3ab20
commit
a39c8e3750
@ -56,7 +56,7 @@ function versionGreater()
|
||||
|
||||
function versionEqual()
|
||||
{
|
||||
if [ "$1" == "$2" ]
|
||||
if [[ "$1" == "$2" ]]
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
@ -112,14 +112,14 @@ function findMinimalVersion()
|
||||
then
|
||||
version="$ver"
|
||||
break
|
||||
elif ([ $greater == false ]) && versionEqual "$ver" "$pragmaVersion"
|
||||
elif [[ "$greater" == false ]] && versionEqual "$ver" "$pragmaVersion"
|
||||
then
|
||||
version="$ver"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$version" ]
|
||||
if [[ "$version" == "" ]]
|
||||
then
|
||||
if [[ "$greater" = true && "$pragmaVersion" =~ 99 ]]
|
||||
then
|
||||
@ -163,7 +163,7 @@ SOLTMPDIR=$(mktemp -d)
|
||||
opts="$opts -o"
|
||||
|
||||
findMinimalVersion $f
|
||||
if [ -z "$version" ]
|
||||
if [[ "$version" == "" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user