From 07719f2096928f62c015b9bff6daa74540cf2194 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 21 Aug 2014 14:27:32 -0400 Subject: move logic out of action parsing --- asp.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/asp.in b/asp.in index bbfd7e1..41c27d4 100644 --- a/asp.in +++ b/asp.in @@ -58,6 +58,11 @@ update_packages() { local refspecs=() remote pkgname declare -A refspec_map + if (( $# == 0 )); then + update_all + return + fi + # map packages to remotes for pkgname; do package_init -n "$pkgname" remote || return 1 @@ -202,11 +207,7 @@ shift case $action in update) - if (( $# == 0 )); then - update_all - else - update_packages "$@" - fi + update_packages "$@" ;; list-repos) map package_get_repos "$@" -- cgit v1.2.3-70-g09d2