enable useful '-ri' (etc.) command line combos

Move the 'if SYNC' block to the top of non-dialog execution.
This commit is contained in:
slakmagik 2011-05-26 19:54:49 +00:00
parent 7c3938549b
commit e3169d9cbe
2 changed files with 9 additions and 5 deletions

View File

@ -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)

View File

@ -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