From e3169d9cbee4862b715eaa7389accf50e528392b Mon Sep 17 00:00:00 2001 From: slakmagik Date: Thu, 26 May 2011 19:54:49 +0000 Subject: [PATCH] enable useful '-ri' (etc.) command line combos Move the 'if SYNC' block to the top of non-dialog execution. --- src/usr/doc/NEWS | 4 ++++ src/usr/sbin/sbopkg | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/usr/doc/NEWS b/src/usr/doc/NEWS index f264043..c6bb8aa 100644 --- a/src/usr/doc/NEWS +++ b/src/usr/doc/NEWS @@ -19,6 +19,10 @@ sbopkg xxxVERSIONxxx (xxxDATExxx) * The 'Build' option in a package's info menu has been renamed to 'Process', along with many other minor informational changes throughout the UI. + * It is now possible to combine the -r flag with other flags + such that a sync is performed first. For example 'sbopkg -ri + foo' will synchronize with the repo and install the latest + foo. sbopkg 0.35.0 (2011-04-28 02:48 UTC) diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index 41384d4..acbe72f 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -4743,6 +4743,11 @@ if [[ $DIAG ]]; then fi main_menu else + if [[ $SYNC ]]; then + crunch_fmt "Syncing with the remote repository into $REPO_DIR." + sync_repo + fi + if [[ $BUILDLIST ]]; then > $STARTQUEUE > $USERQUEUE_LOCK @@ -4859,11 +4864,6 @@ else list_packages fi - if [[ $SYNC ]]; then - crunch_fmt "Syncing with the remote repository into $REPO_DIR." - sync_repo - fi - if [[ -n $SEARCH ]]; then search_and_display "${SEARCH[*]}" fi