commit 8fbf22241a421f5c50a2b4f1a13ec26d2da619c1 parent 07118158f60858e7802c02e83aacde7ca5f79d46 Author: noodle <noodle@pastanoggin.com> Date: Thu, 24 Jul 2025 08:44:49 +0300 enc: make it more posix complaint Diffstat:
| M | enc | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/enc b/enc @@ -10,9 +10,9 @@ passfile="$HOME/.passwords/${1}.cha20" if [ -r "$passfile" ]; then res='' while [ "$res" != 'yes' ]; do - echo -n "file ${passfile} already exists, overwrite it? (yes,no)[no] " + printf 'file %s already exists, overwrite it? (yes,no)[no] ' "$passfile" read -r res - if [ "$res" == '' ] || [ "$res" == 'no' ]; then + if [ "$res" = '' ] || [ "$res" = 'no' ]; then exit fi done