summaryrefslogtreecommitdiff
path: root/bin/hstow
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2023-07-06 19:08:05 +0100
committerSean Whitton <spwhitton@spwhitton.name>2023-07-06 19:08:05 +0100
commitf853266dd5243f440b3d998e10a17be1267f8668 (patch)
tree7c1458a32e904c0702300a7cddefe5503a53aca4 /bin/hstow
parentfa2f9056c43480037b0dea4511790b496ee7efbb (diff)
downloaddotfiles-f853266dd5243f440b3d998e10a17be1267f8668.tar.gz
hstow: escape two forward slashes
Diffstat (limited to 'bin/hstow')
-rwxr-xr-xbin/hstow4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/hstow b/bin/hstow
index ff7d4eb4..ed2a98f5 100755
--- a/bin/hstow
+++ b/bin/hstow
@@ -223,7 +223,7 @@ stow1 () {
sub(/[^\/]*$/, "", dotdotslashes)
gsub(/[^\/]+/, "..", dotdotslashes)
$2 = $1
- $3 = $1; sub(/\/[^/]+$/, "", $3)
+ $3 = $1; sub(/\/[^\/]+$/, "", $3)
$1 = ENVIRON["HOME"] "/" rel
$4 = '"$adoptp"' ? "true" : "false"
$5 = dotdotslashes ".STOW/'"$NAME"'/" rel
@@ -273,7 +273,7 @@ unstow () {
{ gsub(/"/, "\"'"'"'\"'"'"'\"", $1)
printf "\"%s\"\n", $1 | "xargs -E '' -- rm -f"
sub(/^.\//, "", $1)
- sub(/\/?[^/]+$/, "", $1)
+ sub(/\/?[^\/]+$/, "", $1)
if ($1) dirs[++i] = $1
} END { close("xargs -E '' -- rm -f")
for (d in dirs) printf "\"%s\"\n", dirs[d]