summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/ct23
1 files changed, 11 insertions, 12 deletions
diff --git a/bin/ct b/bin/ct
index 467a451..00e325d 100755
--- a/bin/ct
+++ b/bin/ct
@@ -672,27 +672,26 @@ function wrap {
typeset -a packages
shift 2
- if (( $# == 1 )) {
- $function $1
- } else {
+ if [[ $# == 1 || $loop_all == 0 ]] {
- if (( loop_all )) {
- packages=(*(-/))
- } else {
- packages=($*)
+ for package in $*; {
+ cd $PKG_DIR
+ $function $package
}
- [[ -n $progress ]] && all=$(list_packages_local | wc -l)
- [[ -n $progress ]] && current=0
+ } else {
+
+ all=$(list_packages_local | wc -l)
+ current=0
- for package in $packages; {
+ for package in *(-/); {
cd $PKG_DIR
(( current++ ))
- [[ -n $progress && $loop_all == 1 ]] && progress $current $all $progress $package
+ progress $current $all $progress $package
$function $package
}
- [[ -n $progress ]] && clear_line
+ clear_line
}
}