From dafabce039b18fe8be0d25623b59c53f17d06805 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 3 Sep 2015 20:26:07 +0200 Subject: lint_file variable used twice ! --- scripts/check-lint-count.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/check-lint-count.sh b/scripts/check-lint-count.sh index 1491f9a..4d7c8f3 100755 --- a/scripts/check-lint-count.sh +++ b/scripts/check-lint-count.sh @@ -28,30 +28,30 @@ fi tmp_dir="$(mktemp -d lint.XXXXXXXX)" trap "rm -rf $tmp_dir" 1 2 3 6 9 14 15 -lint_file="$tmp_dir/lint.txt" -hist_file="$tmp_dir/hist.txt" +lint_results="$tmp_dir/lint.txt" +hist_results="$tmp_dir/hist.txt" echo "cat //issue/location" | \ xmllint --shell $historical_file | \ - grep '$lint_file + grep '$lint_results echo "cat //issue/location" | \ xmllint --shell $lint_file | \ - grep '$hist_file + grep '$hist_results -old_count=$(cat $lint_file | wc -l) -new_count=$(cat $hist_file | wc -l) +old_count=$(cat $lint_results | wc -l) +new_count=$(cat $hist_results | wc -l) echo "Historical count : $old_count, new count : $new_count" if [[ $new_count > $old_count ]]; then \ echo "FAILURE: lint issues increased from $old_count to $new_count" - diff $lint_file $hist_file + diff $lint_results $hist_results exit 2 fi if [[ $TRAVIS_PULL_REQUEST == false ]]; then \ # Okay, we either stayed the same or reduced our number. # Write it out so we can check it next build! - mv $lint_file $historical_file + cp $lint_file $historical_file fi -- cgit v1.2.3