diff options
author | Leah Rowe <leah@libreboot.org> | 2023-08-27 09:25:50 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-08-27 09:25:50 +0100 |
commit | 5a47c01b11a7fc25f7fae0685d288a78220b954a (patch) | |
tree | 26394c5de89020eb2d6fc143dd9b3349581d6cf4 /fetch | |
parent | 1c8401be25e4749a2eee5ddc77ce7c6ac880c910 (diff) |
scripts: put quotes around file/directory names
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'fetch')
-rwxr-xr-x | fetch | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -35,7 +35,7 @@ main() [ "${depend}" = "" ] || ./fetch ${depend} || \ fail "Cannot fetch dependency, ${depend}, for project, ${name}" - rm -Rf ${tmp_dir} || fail "cannot remove tmpdir, ${tmp_dir}" + rm -Rf "${tmp_dir}" || fail "cannot remove tmpdir, ${tmp_dir}" } read_config() @@ -71,17 +71,17 @@ clone_project() { tmp_dir=$(mktemp -dt "${name}_XXXXX") - git clone ${url} ${tmp_dir} || git clone ${bkup_url} ${tmp_dir} || \ + git clone ${url} "${tmp_dir}" || git clone ${bkup_url} "${tmp_dir}" || \ fail "clone_project: could not download ${name}" ( - cd ${tmp_dir} || fail "clone_project: tmpdir not created" + cd "${tmp_dir}" || fail "clone_project: tmpdir not created" git reset --hard ${revision} || \ fail "clone_project: Cannot reset revision" ) patch_project [ ! -d "${location}" ] || \ - rm -Rf ${location} || \ + rm -Rf "${location}" || \ fail "clone_project: Can't remove directory '${location}'" mv "${tmp_dir}" "${location}" || \ fail "clone_project: could not copy temp file to destination" @@ -91,7 +91,7 @@ patch_project() { patchdir="resources/${name}/patches" - for patchfile in ${PWD}/${patchdir}/*.patch ; do + for patchfile in "${PWD}/${patchdir}"/*.patch ; do [ -f "${patchfile}" ] || continue ( cd "${tmp_dir}" || fail "patch_project: tmpdir unavailable" |