Avoid variables being modified beyond intended scope.

master
Icedream 2018-02-19 09:28:01 +01:00
parent d909c2f3ab
commit 9b61028bf4
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ install_files() {
for f in "${source_dir}"/*; do for f in "${source_dir}"/*; do
case "$(basename "$f")" in case "$(basename "$f")" in
dotfiles) dotfiles)
install_files "${target_dir}" "$f" . (install_files "${target_dir}" "$f" .)
;; ;;
*.jq) *.jq)
tmpfile="$(mktemp)" tmpfile="$(mktemp)"
@ -36,7 +36,7 @@ install_files() {
;; ;;
*) *)
if [ -d "$f" ]; then if [ -d "$f" ]; then
install_files "${target_dir}/${target_filename_prefix}$(basename "$f")" "$f" (install_files "${target_dir}/${target_filename_prefix}$(basename "$f")" "$f")
else else
cp -v "$f" "${target_dir}/${target_filename_prefix}$(basename "$f")" cp -v "$f" "${target_dir}/${target_filename_prefix}$(basename "$f")"
fi fi