Replace sed

This commit is contained in:
Santiago Lo Coco 2022-02-15 22:35:52 -03:00
parent ba807d5f73
commit 6139d641df
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ runDetachedScript() {
shift; for srcFile in "$@"; do
var=$(echo "$srcFile" | awk '{ sub(/.*dotfiles\/other\//, ""); print }')
varFolder=$(echo "$var" | sed "s/$(basename $var)//")
varFolder=${var//\/$(basename "$var")/}
if [[ ! -d "/$varFolder" ]]; then
mkdir -p "/$var"
fi