Replace sed
This commit is contained in:
parent
ba807d5f73
commit
6139d641df
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue