Replace sed
This commit is contained in:
parent
ba807d5f73
commit
6139d641df
|
@ -115,7 +115,7 @@ runDetachedScript() {
|
||||||
shift; for srcFile in "$@"; do
|
shift; for srcFile in "$@"; do
|
||||||
var=$(echo "$srcFile" | awk '{ sub(/.*dotfiles\/other\//, ""); print }')
|
var=$(echo "$srcFile" | awk '{ sub(/.*dotfiles\/other\//, ""); print }')
|
||||||
|
|
||||||
varFolder=$(echo "$var" | sed "s/$(basename $var)//")
|
varFolder=${var//\/$(basename "$var")/}
|
||||||
if [[ ! -d "/$varFolder" ]]; then
|
if [[ ! -d "/$varFolder" ]]; then
|
||||||
mkdir -p "/$var"
|
mkdir -p "/$var"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue