diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pkg | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -28,13 +28,17 @@ die () { } confirm_yes () { - echo -n "${info}$*${reset} [Y/n] " - read -q - [ -z "$REPLY" ] && true + echo -n "$* [Y/n] " + read -k 1 + if ([ "$REPLY" = 'y' -o "$REPLY" = 'Y' -o "$REPLY" = $'\n' ]) { + true + } else { + false + } } confirm_no () { - echo -n "${error}$*${reset} [y/N] " + echo -n "$* [y/N] " read -q } |