On 02/19/2018 04:53 PM, Luke Shumaker wrote:
> Isn't [[ -d ]] there redundant? If globbing gave us $dir/file, of
> course $dir is a directory!
True. I think I still had that in from some point where I hadn't enabled
nullglob yet.
> Meanwhile, this dropped the `-type f` check, though I'm not sure
On Mon, 19 Feb 2018 15:11:43 -0500,
Eli Schwartz via arch-projects wrote:
> --- a/db-update
> +++ b/db-update
> @@ -9,9 +9,14 @@ if (( $# >= 1 )); then
> fi
>
> # Find repos with packages to release
> -if ! staging_repos=($(find "${STAGING}" -mindepth 1 -type f -name
> "*${PKGEXTS}" -printf '
Don't bother emitting errors. bash doesn't show globbing errors if it
cannot read a directory to try globbing there. And the former code never
aborted on errors anyway, as without `set -o pipefail` the sort command
swallowed the return code.
Signed-off-by: Eli Schwartz
---
v2: use mapfile as sug