repo-add: clarify exit messages
Clarify if repo-add does not create a new database due to failures or due to there being nothing to do. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
f91fa546f6
commit
332d2a1922
1 changed files with 7 additions and 3 deletions
|
@ -700,13 +700,17 @@ for arg in "${args[@]:1}"; do
|
|||
done
|
||||
|
||||
# if the whole operation was a success, re-zip and rotate databases
|
||||
if (( !fail )) && (( DB_MODIFIED )); then
|
||||
if (( fail )); then
|
||||
msg "$(gettext "Package database was not modified due to errors.")"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if (( DB_MODIFIED )); then
|
||||
msg "$(gettext "Creating updated database file '%s'")" "$REPO_DB_FILE"
|
||||
create_db
|
||||
rotate_db
|
||||
else
|
||||
msg "$(gettext "No packages modified, nothing to do.")"
|
||||
exit $(( fail != 0 ))
|
||||
msg "$(gettext "No changes made to package database.")"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Reference in a new issue