mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use local variables inside bash functions
This commit is contained in:
parent
cd420dc0bc
commit
eea88f33aa
@ -43,11 +43,13 @@ test "${output//[[:blank:]]/}" = "3"
|
|||||||
|
|
||||||
function compileFull()
|
function compileFull()
|
||||||
{
|
{
|
||||||
files="$*"
|
local files="$*"
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
output=$( ("$SOLC" $FULLARGS $files) 2>&1 )
|
local output=$( ("$SOLC" $FULLARGS $files) 2>&1 )
|
||||||
failed=$?
|
local failed=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ $failed -ne 0 ]
|
if [ $failed -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "Compilation failed on:"
|
echo "Compilation failed on:"
|
||||||
@ -58,14 +60,16 @@ function compileFull()
|
|||||||
|
|
||||||
function compileWithoutWarning()
|
function compileWithoutWarning()
|
||||||
{
|
{
|
||||||
files="$*"
|
local files="$*"
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
output=$("$SOLC" $files 2>&1)
|
local output=$("$SOLC" $files 2>&1)
|
||||||
failed=$?
|
local failed=$?
|
||||||
# Remove the pre-release warning from the compiler output
|
# Remove the pre-release warning from the compiler output
|
||||||
output=$(echo "$output" | grep -v 'pre-release')
|
output=$(echo "$output" | grep -v 'pre-release')
|
||||||
echo "$output"
|
echo "$output"
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
test -z "$output" -a "$failed" -eq 0
|
test -z "$output" -a "$failed" -eq 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user