blob: 88ca72e87cadaffaa5474228ea6a54586578366f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env bash
set -euo pipefail
for repo_path in repos/*; do
if [[ -d "$repo_path" ]]; then
repo_name=$(basename "$repo_path" .git)
echo "Fetching $repo_name"
git -C "$repo_path" fetch --tags --prune origin
# Update agefile.
mkdir -p "$repo_path/info/web"
git -C "$repo_path" for-each-ref \
--sort=-committerdate \
--format='%(committerdate:format:%Y-%m-%d %H:%M:%S %z)' \
refs/ \
| head -1 > "$repo_path/info/web/last-modified"
fi
done
|