file renamed and posix fixed
This commit is contained in:
parent
3d43617afc
commit
3c70964009
43
test
43
test
@ -1,43 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [[ $1 -eq 1 ]]; then
|
||||
|
||||
echo "SETTITLE title
|
||||
SETPROMPT prompt
|
||||
SETDESC PROMPT
|
||||
GETPIN
|
||||
BYE" | ./pinentry-dmenu
|
||||
|
||||
elif [[ $1 -eq 2 ]]; then
|
||||
|
||||
echo "SETTITLE title
|
||||
SETPROMPT confirm
|
||||
SETDESC CONFIRM
|
||||
confirm
|
||||
BYE" | ./pinentry-dmenu
|
||||
|
||||
elif [[ $1 -eq 3 ]]; then
|
||||
|
||||
echo "SETTITLE title
|
||||
SETPROMPT prompt
|
||||
SETDESC REPEAT
|
||||
SETREPEAT repeat
|
||||
GETPIN
|
||||
BYE" | ./pinentry-dmenu
|
||||
|
||||
else
|
||||
|
||||
echo "SETTITLE title
|
||||
SETPROMPT prompt
|
||||
SETDESC PROMPT
|
||||
GETPIN
|
||||
SETPROMPT confirm
|
||||
SETDESC CONFIRM
|
||||
confirm
|
||||
SETPROMPT repeat
|
||||
SETDESC REPEAT
|
||||
SETREPEAT
|
||||
GETPIN
|
||||
BYE" | ./pinentry-dmenu
|
||||
|
||||
fi
|
36
test.sh
Executable file
36
test.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
prompt="SETTITLE title
|
||||
SETPROMPT prompt
|
||||
SETDESC PROMPT
|
||||
GETPIN"
|
||||
|
||||
confirm="SETTITLE title
|
||||
SETPROMPT confirm
|
||||
SETDESC CONFIRM
|
||||
confirm"
|
||||
|
||||
repeat="SETTITLE title
|
||||
SETPROMPT prompt
|
||||
SETDESC REPEAT
|
||||
SETREPEAT repeat
|
||||
GETPIN"
|
||||
|
||||
case $1 in
|
||||
1)
|
||||
printf "%s\nBYE" "$prompt" \
|
||||
| ./pinentry-dmenu
|
||||
;;
|
||||
2)
|
||||
printf "%s\nBYE" "$confirm" \
|
||||
| ./pinentry-dmenu
|
||||
;;
|
||||
3)
|
||||
printf "%s\nBYE" "$repeat" \
|
||||
| ./pinentry-dmenu
|
||||
;;
|
||||
*)
|
||||
printf "%s\n%s\n%s\nBYE" "$prompt" "$confirm" "$repeat" \
|
||||
| ./pinentry-dmenu
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user