summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-02-24 12:31:53 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-02-24 12:31:53 +0100
commitff5d9a5b255bb5703369d959cee913fc06fc33fb (patch)
tree010ab469b66ed782403e406d2e54ee97242baa11 /bin
parentf6cc7a0a3e73335401cf44740b8f59807c932e9c (diff)
pkg: Fixed some cosmetic mistakes in check_prereqs
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkg20
1 files changed, 10 insertions, 10 deletions
diff --git a/bin/pkg b/bin/pkg
index 8a3f609..6a7dbae 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -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
}