mkdir fix
This commit is contained in:
parent
54c6df3fd4
commit
56ca0556f1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user