From 5af47c3f33e0380cf5a381f5aec8ee6b7ed20363 Mon Sep 17 00:00:00 2001 From: Fabrice Reix Date: Sat, 19 Sep 2020 18:09:30 +0200 Subject: [PATCH] Clean script --- build.sh | 13 ------------- ci/man.sh | 1 + ci/setup.sh | 2 -- integration/hurl_output.sh | 6 +++--- integration/lint.sh | 6 +++--- integration/run.sh | 2 +- 6 files changed, 8 insertions(+), 22 deletions(-) diff --git a/build.sh b/build.sh index cc125fd83..f1a2a0940 100755 --- a/build.sh +++ b/build.sh @@ -1,10 +1,6 @@ #!/bin/bash set -e - -ROOT_DIR="$(dirname "$0")" - -#cargo clean cargo build --features "strict" cargo test cargo doc --document-private-items @@ -12,15 +8,6 @@ cargo doc --document-private-items touch src/lib.rs cargo clippy -- -D warnings -DOCS_DIR="$ROOT_DIR/docs" -MAN_DIR="$ROOT_DIR/target/man" -mkdir -p "$MAN_DIR" -cp "$DOCS_DIR/hurl.1" "$MAN_DIR" -cp "$DOCS_DIR/hurlfmt.1" "$MAN_DIR" -gzip "$MAN_DIR"/hurl.1 -gzip "$MAN_DIR"/hurlfmt.1 - - echo echo "!!! Build successful !!!" diff --git a/ci/man.sh b/ci/man.sh index 66f3eef1e..e03d9a669 100755 --- a/ci/man.sh +++ b/ci/man.sh @@ -1,6 +1,7 @@ #!/bin/bash set -e +rm -rf target/man mkdir -p target/man cp docs/hurl.1 target/man cp docs/hurlfmt.1 target/man diff --git a/ci/setup.sh b/ci/setup.sh index be1507122..c13dcbccd 100755 --- a/ci/setup.sh +++ b/ci/setup.sh @@ -10,9 +10,7 @@ cargo install cargo-deb # Python/Flask sudo apt-get install python3-pip -which python3 python3 -V -which pip3 pip3 install Flask (cd integration && python3 server.py&) diff --git a/integration/hurl_output.sh b/integration/hurl_output.sh index 47d101ed7..eeb1dc15a 100755 --- a/integration/hurl_output.sh +++ b/integration/hurl_output.sh @@ -2,8 +2,8 @@ for command_file in "$@"; do echo "$command_file" - command=$(cat $command_file) - expected=$(cat ${command_file%.*}.output) + command=$(cat "$command_file") + expected=$(cat "${command_file%.*}.output") output="$($command 2>&1)" if [ "$output" != "$expected" ]; then @@ -11,4 +11,4 @@ for command_file in "$@"; do exit 1 fi -done \ No newline at end of file +done diff --git a/integration/lint.sh b/integration/lint.sh index ae4c9fb72..11437b7d5 100755 --- a/integration/lint.sh +++ b/integration/lint.sh @@ -18,8 +18,8 @@ for hurl_file in "$@"; do fi STDERR_ACTUAL=$(cat /tmp/test.stderr) - STDERR_EXPECTED=$(cat ${hurl_file%%.*}.err) - diff ${hurl_file%%.*}.err /tmp/test.stderr + STDERR_EXPECTED=$(cat "${hurl_file%%.*}.err") + diff "${hurl_file%%.*}.err" /tmp/test.stderr if [ "$STDERR_ACTUAL" != "$STDERR_EXPECTED" ]; then echo "ERROR stderr" echo " expected:" @@ -31,7 +31,7 @@ for hurl_file in "$@"; do hurlfmt "$hurl_file" --no-color >/tmp/test.lint LINT_ACTUAL=$(cat /tmp/test.lint) - LINT_EXPECTED=$(cat ${hurl_file%%.*}.hurl.lint) + LINT_EXPECTED=$(cat "${hurl_file%%.*}.hurl.lint") if [ "$LINT_ACTUAL" != "$LINT_EXPECTED" ]; then echo "ERROR linting" echo " expected:" diff --git a/integration/run.sh b/integration/run.sh index b46f2bfd1..f41babc1c 100755 --- a/integration/run.sh +++ b/integration/run.sh @@ -10,7 +10,7 @@ for hurl_file in "$@"; do options+=("$(cat "${hurl_file%.*}.options")") fi - cmd="hurl $hurl_file ${options[@]}" + cmd="hurl $hurl_file ${options[*]}" echo "$cmd" $cmd 2>/tmp/test.stderr >/tmp/test.stdout