Replace some older shell syntax with newer and/or more reliable equivalents

This commit is contained in:
Kamil Śliwak 2020-12-11 18:47:51 +01:00
parent 8c57c7cb35
commit 4c186321c8
6 changed files with 8 additions and 8 deletions

View File

@ -56,7 +56,7 @@ get_logfile_basename() {
echo -ne "${filename}"
}
BOOST_TEST_ARGS=("--color_output=no" "--show_progress=yes" "--logger=JUNIT,error,test_results/`get_logfile_basename`.xml" "${BOOST_TEST_ARGS[@]}")
BOOST_TEST_ARGS=("--color_output=no" "--show_progress=yes" "--logger=JUNIT,error,test_results/$(get_logfile_basename).xml" "${BOOST_TEST_ARGS[@]}")
SOLTEST_ARGS=("--evm-version=$EVM" "${SOLTEST_FLAGS[@]}")
test "${OPTIMIZE}" = "1" && SOLTEST_ARGS+=(--optimize)

View File

@ -78,6 +78,6 @@ mkdir -p upload
cp "$BUILD_DIR/libsolc/soljson.js" upload/
cp "$BUILD_DIR/libsolc/soljson.js" ./
OUTPUT_SIZE=`ls -la soljson.js`
OUTPUT_SIZE=$(ls -la soljson.js)
echo "Emscripten output size: $OUTPUT_SIZE"

View File

@ -11,7 +11,7 @@ REPO_ROOT="$(dirname "$0")"/..
commitdate=$(git show --format=%ci HEAD | head -n 1 | cut - -b1-10 | sed -e 's/-0?/./' | sed -e 's/-0?/./')
# file exists and has zero size -> not a prerelease
if [ -e prerelease.txt -a ! -s prerelease.txt ]
if [ -e prerelease.txt ] && [ ! -s prerelease.txt ]
then
versionstring="$version"
else
@ -25,7 +25,7 @@ REPO_ROOT="$(dirname "$0")"/..
git checkout-index -a --prefix="$SOLDIR"
# Store the commit hash
echo "$commithash" > "$SOLDIR/commit_hash.txt"
if [ -e prerelease.txt -a ! -s prerelease.txt ]
if [ -e prerelease.txt ] && [ ! -s prerelease.txt ]
then
cp prerelease.txt "$SOLDIR/"
fi

View File

@ -21,7 +21,7 @@ cd solidity
commithash=$(git rev-parse --short=8 HEAD)
echo -n "$commithash" > commit_hash.txt
version=$("$(dirname "$0")/get_version.sh")
if [ "$branch" = "release" -o "$branch" = v"$version" ]
if [ "$branch" = "release" ] || [ "$branch" = v"$version" ]
then
echo -n > prerelease.txt
else

View File

@ -34,7 +34,7 @@ IFS=" " read -r -a SMT_FLAGS <<< "$SMT_FLAGS"
source "${REPO_ROOT}/scripts/common.sh"
WORKDIR=`mktemp -d`
WORKDIR=$(mktemp -d)
CMDLINE_PID=
cleanup() {

View File

@ -121,8 +121,8 @@ function test_solc_behaviour()
local stderr_expected="${7}"
local stdout_expectation_file="${8}" # the file to write to when user chooses to update stdout expectation
local stderr_expectation_file="${9}" # the file to write to when user chooses to update stderr expectation
local stdout_path=`mktemp`
local stderr_path=`mktemp`
local stdout_path=$(mktemp)
local stderr_path=$(mktemp)
trap "rm -f $stdout_path $stderr_path" EXIT