Fix warnings in gen_expect_output.sh

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IAJI1A

Signed-off-by: Andrey Efremov <efremov.andrey@huawei-partners.com>
Change-Id: If9b5d6386a8f23b23aff4ff16290da4a09422084
This commit is contained in:
Andrey Efremov 2024-08-12 17:47:40 +08:00
parent 831eb9d630
commit 5ee56c6cc8

View File

@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
MODE=$1
if [ $# -ne 3 ] || ([ $MODE != "pgo" ] && [ $MODE != "aot" ]); then
if [ $# -ne 3 ] || ([ "$MODE" != "pgo" ] && [ "$MODE" != "aot" ]); then
echo "Usage: $0 [pgo|aot] <inputs.ts> <expect_output.txt>"
exit 1
fi
@ -22,5 +23,5 @@ INPUT=$2
OUTPUT=$3
# copy license from this file
tail -n +2 $0 | head -n 13 > $OUTPUT
grep -Po "//($MODE)?: \K.*$" $INPUT >> $OUTPUT
tail -n +2 $0 | head -n 13 > "$OUTPUT"
grep -Po "//($MODE)?: \K.*$" "$INPUT" >> "$OUTPUT"