diff --git a/autodist-upstream-updates b/autodist-upstream-updates index a83e922..33dc52d 100755 --- a/autodist-upstream-updates +++ b/autodist-upstream-updates @@ -24,16 +24,6 @@ XORG_RELEASE=current done } -[ -r $PKGLIST_FILE ] || { - echo "Error: file $PKGLIST_FILE cannot be read; aborting." >&2 - exit 1 -} - -[ -r $ALIASES_DB ] || { - echo "Error: file $ALIASES_DB cannot be read; aborting." >&2 - exit 1 -} - function usage() { echo "openmamba-upstream-updates - finds upstream packages updates from different internet resources" @@ -168,6 +158,15 @@ UPDATES_DB=$CACHE_DIR/upstream-updates ALIASES_DB=$CACHE_DIR/aliases MANUALVER_DB=$CACHE_DIR/manualver +[ -s $PKGLIST_FILE ] || { + echo "Error: file $PKGLIST_FILE is missing or empty; aborting." >&2 + exit 1 +} + +[ -r $ALIASES_DB ] || { + echo "Error: file $ALIASES_DB cannot be read; aborting." >&2 + exit 1 +} parse_arch_linux() { # parse Arch Linux package list