#!/bin/sh

# clean git repositories

# shellcheck disable=SC2119,SC2120

# shellcheck source=../lib/load-configuration
. "${0%/*}/../lib/load-configuration"

for repo in ${repo_names}; do
  eval 'repo_path="${repo_paths__'"${repo}"'}"'
  printf 'cleaning %s (%s) ...\n' \
    "${repo}" \
    "${repo_path}"
  ionice -n 7 git -C "${repo_path}" gc
  printf '... done\n'
done