diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-02-24 12:31:53 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-02-24 12:31:53 +0100 |
commit | ff5d9a5b255bb5703369d959cee913fc06fc33fb (patch) | |
tree | 010ab469b66ed782403e406d2e54ee97242baa11 /bin | |
parent | f6cc7a0a3e73335401cf44740b8f59807c932e9c (diff) |
pkg: Fixed some cosmetic mistakes in check_prereqs
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pkg | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -20,9 +20,9 @@ typeset -a -U triggers ## Internal functions for displaying stuff ## -info=$'\e[0;36m' -error=$'\e[0;31m' -reset=$'\e[0m' +c_info=$'\e[0;36m' +c_error=$'\e[0;31m' +c_reset=$'\e[0m' function debug { typeset func line @@ -39,15 +39,15 @@ function debug { alias debug='debug ${(%):-%N} ${(%):-%i}' function info { - (( SILENT )) || echo -ne "${info}$*${reset}" + (( SILENT )) || echo -ne "${c_info}$*${c_reset}" } function warn { - echo -ne "${error}$*${reset}" > /dev/stderr + echo -ne "${c_error}$*${c_reset}" > /dev/stderr } function die { - echo -ne "${error}$*${reset}" > /dev/stderr + echo -ne "${c_error}$*${c_reset}" > /dev/stderr exit 100 } @@ -207,7 +207,7 @@ function progress { clear_line c=$(( currentper/5 )) a=$(( 20-c )) - output+="${info}$desc${reset} [" + output+="${c_info}$desc${c_reset} [" item $c '=' item $a ' ' output+="] $currentper% $desc2" @@ -428,7 +428,7 @@ function check_prereqs { if [[ $1 == 'package' ]] { is_installed $2 || info "$package suggests package $2\n" } else { - $* || info "Suggest failed: $*\n" + $* || echo "Suggest failed: $*\n" } } @@ -450,8 +450,8 @@ function check_prereqs { } if [[ -n $warn || -n $info ]] { - warn $warn - info $info + [[ -n $warn ]] && warn $warn + [[ -n $info ]] && echo -n $info read -q } |