diff options
author | Kenny Root <kroot@google.com> | 2015-12-16 15:41:32 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2015-12-16 15:41:34 -0800 |
commit | b77fcf4c1fbd4bb163b4f8b24e173fec429164ff (patch) | |
tree | 584d6ba5bcc185c1bf2b89303e9fd3c5ef4cd60f | |
parent | 2c243d61d94b93eaef6fd5e0f727c9a2be838338 (diff) | |
download | nist-pkits-b77fcf4c1fbd4bb163b4f8b24e173fec429164ff.tar.gz |
Quote variables in import script
Without quoting the strings, directory paths with spaces cause strange
errors.
Change-Id: I4826cfe41f0756a370429614f6c169482461d393
-rwxr-xr-x | generate-tests.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generate-tests.sh b/generate-tests.sh index 4446984..4320208 100755 --- a/generate-tests.sh +++ b/generate-tests.sh @@ -70,15 +70,15 @@ TEMP_FILES=$(mktemp --tmpdir generated-nist-files.XXXXXXXXX) ${PDFTOTEXT} -layout -nopgbrk -eol unix "${PDF}" "${TEMP_TEXT}" -"$(dirname $0)/extract-pkits-tests.pl" "${TEMP_TEXT}" "${TEMP_JAVA}" "${TEMP_FILES}" +"$(dirname "$0")/extract-pkits-tests.pl" "${TEMP_TEXT}" "${TEMP_JAVA}" "${TEMP_FILES}" sed -i '/DO NOT MANUALLY EDIT -- BEGIN AUTOMATICALLY GENERATED TESTS/,/DO NOT MANUALLY EDIT -- END AUTOMATICALLY GENERATED TESTS/{//!d}' "${TARGET}" sed -i '/DO NOT MANUALLY EDIT -- BEGIN AUTOMATICALLY GENERATED TESTS/r '"${TEMP_JAVA}" "${TARGET}" -pushd "$(dirname $0)" +pushd "$(dirname "$0")" mkdir -p "${STORAGE_DIR}" while IFS= read -r -d $'\n' file; do unzip -q -o -d "${STORAGE_DIR}" "${ZIP}" "${file}" -done < ${TEMP_FILES} +done < "${TEMP_FILES}" popd shasum_file() { |