clean up script

This commit is contained in:
Roy Crihfield 2023-09-27 16:33:04 +08:00
parent f30168fa52
commit eab53b9a71

View File

@ -14,14 +14,12 @@ shift $((OPTIND - 1))
A=${1:-geth} A=${1:-geth}
B=${2:-plugeth} B=${2:-plugeth}
if [[ -n "$output_dir" ]]; then if [[ -z "$output_dir" ]]; then
mkdir -p $output_dir output_dir=$(mktemp -d)
fi
A_OUTPUT="$output_dir/A" A_OUTPUT="$output_dir/A"
B_OUTPUT="$output_dir/B" B_OUTPUT="$output_dir/B"
else
A_OUTPUT=$(mktemp -d -t A_XXXX)
B_OUTPUT=$(mktemp -d -t B_XXXX)
fi
./dumpdiff.$A $A_OUTPUT ./dumpdiff.$A $A_OUTPUT
./dumpdiff.$B $B_OUTPUT ./dumpdiff.$B $B_OUTPUT
@ -34,5 +32,4 @@ for file in $(ls $A_OUTPUT); do
mv $tmpfile "$dir/$file" mv $tmpfile "$dir/$file"
done done
(set -x; diff "${A_OUTPUT}/$file" "${B_OUTPUT}/$file") (set -x; diff "${A_OUTPUT}/$file" "${B_OUTPUT}/$file")
echo Files match: "$PLUGIN_OUTPUT/$file" "$GETH_OUTPUT/$file"
done done