From 56ca0556f1a98af6854efac882d9e656d6f89ac3 Mon Sep 17 00:00:00 2001 From: accel Date: Wed, 12 Jan 2022 00:06:48 +0300 Subject: [PATCH] mkdir fix --- tools.funcs.zsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools.funcs.zsh b/tools.funcs.zsh index c3f0014..92a825d 100644 --- a/tools.funcs.zsh +++ b/tools.funcs.zsh @@ -34,24 +34,24 @@ function zshlibs_boot() function zshlibs_ensure() { - target=${2} - typ=${1} - if ! test -e ${target} + target="${2}" + typ="${1}" + if ! test -e "${target}" then zshlibs_log zshlibs_ensure "creating '${target}' ($typ) …" case $typ in -d) - mkdir -p ${target} \ + mkdir -p "${target}" \ || zshlibs_log $0 "unable to create directory '${target}'" \ && return 2 ;; -f) - touch ${target} \ + touch "${target}" \ || zshlibs_log $0 "unable to create file '${target}'" \ && return 2 esac zshlibs_log zshlibs_ensure "target '${target}' created" - elif test ${typ} ${target} + elif test "${typ}" "${target}" then zshlibs_log zshlibs_ensure "target '${target}' ($typ) present" return 0