summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsmael Luceno2016-08-13 20:23:41 -0300
committerIsmael Luceno2016-08-13 20:23:41 -0300
commite38a64bb03a854657636fff3a57cdd430c17690c (patch)
tree8b3563470bbeff910eeba90c2b3fade61159eef9
parent48cefbc49f33e84889502f8bfdeb0cbfea3dce02 (diff)
libupdate: Colorize multiversion_check suggestions
-rw-r--r--var/lib/quill/modules/libupdate12
1 files changed, 7 insertions, 5 deletions
diff --git a/var/lib/quill/modules/libupdate b/var/lib/quill/modules/libupdate
index db8dfe7..b998099 100644
--- a/var/lib/quill/modules/libupdate
+++ b/var/lib/quill/modules/libupdate
@@ -118,12 +118,14 @@ function multiversion_check()
{
if [[ ${#versions[@]} != 1 ]]
then #we have a problem
- message "Oh dear, detected a multiversion spell. Going to cat DETAILS for you "
- message "and then you will tell me which variable I need to set, so I can get "
- message "to the correct version ($version)."
+ message "$MESSAGE_COLOR"
+ message "Oh dear, detected a multiversion spell. Going to cat$FILE_COLOR DETAILS$MESSAGE_COLOR for you"
+ message "and then you will tell me which variable I need to set, so I can get"
+ message "to the correct version ($VERSION_COLOR$version$MESSAGE_COLOR)."
+ message "$DEFAULT_COLOR"
sleep 3
# suggestions
- awk '
+ awk -vquery="$(echo -e $QUERY_COLOR)" -vnormal="$(echo -e $DEFAULT_COLOR)" '
/^[\t ]*cat/ { exit } # Suppress description
{ print }
function take(s) { gsub(/["${}]+/, "", s); S[s] }
@@ -137,7 +139,7 @@ function multiversion_check()
END {
if (!length(S)) exit
for (i in S) s = s " " i
- print "\nPerhaps it is one of these:" s
+ print query "\nPerhaps it is one of these:" normal s
}
' DETAILS
query_string version_switch "${QUERY_COLOR}Please enter the appropriate variable. Example: UGU_DEVEL=y${DEFAULT_COLOR} "