From 915f636ea838810ffffe1dbe53f045a3d339e7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 3 May 2017 11:12:56 +0200 Subject: Also color Install? question --- utils/inst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'utils/inst') diff --git a/utils/inst b/utils/inst index 2dbf474..4d44cdf 100644 --- a/utils/inst +++ b/utils/inst @@ -16,8 +16,7 @@ dodiff() { fi if ! [ -f "$OUT" ]; then echo -e "\e[1;33mNot installed:\e[0m $1 => $OUT" - read -p "Install? (Y/n) " - if [[ $REPLY =~ ^[Yy]?$ ]]; then + if ask "Install?"; then doinst "$1" "$OUT" fi return @@ -50,8 +49,7 @@ checkdiff() { D="${d#$1}" if [ ! -d "$2/$D" ]; then echo -e "\e[1;33mDirectory not installed:\e[0m $1/$D => $2/$D" - read -p "Install? (Y/n) " - if [[ $REPLY =~ ^[Yy]?$ ]]; then + if ask "Install?"; then doinst "$1/$D/" "$2/$D" fi fi -- cgit v1.2.3