Can't use realpath on something that does not exist yet

This commit is contained in:
Corrado Primier 2020-03-04 23:49:52 +00:00
parent 5bb9376941
commit cdd82136e0

View File

@ -41,7 +41,7 @@ inspice() {
url="${1}"
dst="${2}"
if [ ! -e "${dst}" ] ; then
mkdir -p "`realpath ${dst}/..`"
mkdir -p "`echo \`realpath "${dst}"\` | sed 's|/[^/]\+/\?$|/|'`"
${git} clone "${url}" "$dst"
else
indica "${dst} already present, skipping"