fetch--mirror: shellcheck

pull/1017/head
Alad Wenter 2 months ago
parent b6c2e39a15
commit 0e1541d19b
  1. 6
      lib/aur-fetch--mirror

@ -1,7 +1,7 @@
#!/bin/bash
set -o errexit
[[ -v AUR_DEBUG ]] && set -o xtrace
argv0=fetch--mirror
#argv0=fetch--mirror
XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
AUR_MIRROR=${AUR_MIRROR:-https://github.com/archlinux/aur}
AUR_MIRROR_TTL=${AUR_MIRROR_TTL:-300}
@ -32,7 +32,7 @@ git_ls_remote_ttl() {
printf -v now '%(%s)T' -1
if ! cachetime=$(stat -c %Y "$1" 2>/dev/null) || (( now > (cachetime + ttl) )); then
git ls-remote origin 'refs/heads/*' | awk -F/ '{print $3}'
git ls-remote origin 'refs/heads/*' | awk -F/ '{print $3}' >"$1"
fi
}
@ -45,7 +45,7 @@ exec {fd}< "$AUR_ROOT"
# Keep a refcache to filter out packages which are not in AUR. This is
# includes unlisted packages (unlike `aur pkglist --pkgbase`)
git_ls_remote_ttl 'remote-pkgbase' >'remote-pkgbase'
git_ls_remote_ttl 'remote-pkgbase'
# Retrieve list of active remotes
mapfile -t active_remotes < <(git_active_remotes | grep -v 'main')

Loading…
Cancel
Save