From 803451579f61115dc73c9e78c67cdaa3aa3fefa5 Mon Sep 17 00:00:00 2001 From: Dwight Guth Date: Mon, 8 Jul 2024 10:19:01 -0500 Subject: [PATCH] make llvm-kompile-matching script slightly more robust (#4498) We should be quoting certain variables passed into the script, and we also should not fail the script if the directory that the script creates does not exist. --- llvm-backend/src/main/scripts/bin/llvm-kompile-matching | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm-backend/src/main/scripts/bin/llvm-kompile-matching b/llvm-backend/src/main/scripts/bin/llvm-kompile-matching index 116c22aa2ee..3aea7bd3953 100755 --- a/llvm-backend/src/main/scripts/bin/llvm-kompile-matching +++ b/llvm-backend/src/main/scripts/bin/llvm-kompile-matching @@ -45,10 +45,10 @@ then elif [ $# -lt 4 ]; then fail "ERROR: Not enough arguments!" -elif [ ! -f $1 ]; +elif [ ! -f "$1" ]; then fail "ERROR: not a file!" -elif [ ! -d $3 ]; +elif ! mkdir -p "$3"; then fail "ERROR: not a directory!" fi