aboutsummaryrefslogtreecommitdiff
path: root/mkrootfs.sh
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-05-13 03:18:02 +0300
committerCem Keylan <cem@ckyln.com>2020-05-13 03:18:02 +0300
commit011cfae08c1409ef012480cc90ce30159ecb2a16 (patch)
treebca25728cf77c4779f82334a64842727f7f7fe4b /mkrootfs.sh
parent88d7910b4e857983c939cb10237e1c4a339a936b (diff)
downloadmkrootfs-011cfae08c1409ef012480cc90ce30159ecb2a16.tar.gz
remove ask function, do it manually
Diffstat (limited to 'mkrootfs.sh')
-rwxr-xr-xmkrootfs.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/mkrootfs.sh b/mkrootfs.sh
index 787f537..6767911 100755
--- a/mkrootfs.sh
+++ b/mkrootfs.sh
@@ -7,7 +7,6 @@
# Functions
msg() { printf '\033[1;35m-> \033[m%s\n' "$@" ;}
-ask() { printf '\033[1;33m== %s ==\n(y/N) ' "$1" ; read ans; case "$ans" in [Yy]*) return 0 ;; *) return 1 ;; esac ;}
die() { printf '\033[1;31m!> ERROR: \033[m%s\n' "$@" >&2; exit 1 ;}
@@ -52,7 +51,9 @@ EOF
# set in the configuration, the bootstrapper will
# start immediately
[ "$NOCONFIRM" ] || {
- ask "Do you want to start the bootstrapper?" || die "User exited"
+ printf '\033[1;33m?> \033[mDo you want to start the bootstrapper? (y/N)\n'
+ read -r ans
+ case "$ans" in [Yy]*|'') ;; *) die "User exited" ; esac
}
# Script starts here