aboutsummaryrefslogtreecommitdiffstats
path: root/blind-rotate-180
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-16 08:03:21 +0100
committerMattias Andrée <maandree@kth.se>2017-01-16 08:03:21 +0100
commitcd63924da6e212b5672724b422eadbc71bf4e614 (patch)
tree3120836f3df439cc79c3fc10c55593aa55b22b3f /blind-rotate-180
parentAdd blind-rotate-90, blind-rotate-180, and blind-rotate-270 (diff)
downloadblind-cd63924da6e212b5672724b422eadbc71bf4e614.tar.gz
blind-cd63924da6e212b5672724b422eadbc71bf4e614.tar.bz2
blind-cd63924da6e212b5672724b422eadbc71bf4e614.tar.xz
blind-rotate-*: support arbitrary paths
Only an idiot would use <newline> in paths, but let's support it anyway (for fun).
Diffstat (limited to 'blind-rotate-180')
-rwxr-xr-xblind-rotate-1804
1 files changed, 2 insertions, 2 deletions
diff --git a/blind-rotate-180 b/blind-rotate-180
index 73cbd15..2f50956 100755
--- a/blind-rotate-180
+++ b/blind-rotate-180
@@ -12,7 +12,7 @@ if ! test $# = 0; then
fi
fi
-flip="$(printf '%s\n' "$0" | sed 's/[^/]*$/blind-flip/')"
-flop="$(printf '%s\n' "$0" | sed 's/[^/]*$/blind-flop/')"
+flip="$(printf '%s\n' "$0" | tr '/\n' '\n/' | sed '$s/^.*$/blind-flip\//' | tr '/\n' '\n/')"
+flop="$(printf '%s\n' "$0" | tr '/\n' '\n/' | sed '$s/^.*$/blind-flop\//' | tr '/\n' '\n/')"
"$flip" | "$flop"