blind-primary-key: remove ./ and make more portable - blind - suckless command-… | |
git clone git://git.suckless.org/blind | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 3b3646effb548d2af894422f2123dd7976d7f1af | |
parent c8b38980f671e9b8488ae2c91668843900c85640 | |
Author: Mattias Andrée <[email protected]> | |
Date: Sun, 23 Jul 2017 22:33:28 +0200 | |
blind-primary-key: remove ./ and make more portable | |
Signed-off-by: Mattias Andrée <[email protected]> | |
Diffstat: | |
M blind-primary-key | 12 ++++++------ | |
1 file changed, 6 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/blind-primary-key b/blind-primary-key | |
@@ -27,12 +27,12 @@ while ! test $# = 0; do | |
if test "$1" = --; then | |
shift 1 | |
break | |
- elif test "${1::1}" = -; then | |
- arg="${1:1}" | |
+ elif test "$(printf '%s\n' "$1" | sed 's/^\(.\).*$/\1/')" = -; then | |
+ arg="$(printf '%s\n' "$1" | sed 's/^.//')" | |
shift 1 | |
- while test -n "${arg::1}"; do | |
- flag="${arg::1}" | |
- arg="${arg:1}" | |
+ while test -n "$arg"; do | |
+ flag="$(printf '%s\n' "$arg" | sed 's/^\(.\).*$/\1/')" | |
+ arg="$(printf '%s\n' "$arg" | sed 's/^.//')" | |
if test "$flag" = 1; then | |
x=x; y=y; z=z | |
elif test "$flag" = 2; then | |
@@ -81,7 +81,7 @@ else | |
unconvert () { | |
blind-affine-colour -al \ | |
<(blind-from-named -a blind-${pid}-invmat \ | |
- ./blind-arithm -xyz max <(./blind-single-colou… | |
+ blind-arithm -xyz max <(blind-single-colour -w… | |
blind-repeat inf -) | |
} | |
fi |