diff options
Diffstat (limited to 'scripts/bbconfirm')
| -rwxr-xr-x | scripts/bbconfirm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/bbconfirm b/scripts/bbconfirm new file mode 100755 index 0000000..cae1153 --- /dev/null +++ b/scripts/bbconfirm @@ -0,0 +1,9 @@ +#!/bin/sh +# Ask for user confirmation +set -e +if command -v ask >/dev/null; then + ask -n "$(printf "$1Is that okay?\033[?25h")" +else + reply="$(bbask -1 "$(printf "$1\033[0;1mIs that okay? [y/N] ")")" + [ "$reply" != 'y' ] +fi |
