3 FOSSILS_SCRIPT_DIR
="$(dirname "$
(readlink
-f "$0")")"
4 FOSSILS_YAML
="$(readlink -f "$1")"
11 git clone
--no-checkout "$repo" fossils-db
12 (cd fossils-db
; git
reset "$commit" || git
reset "origin/$commit")
17 python3
"$FOSSILS_SCRIPT_DIR/query_fossils_yaml.py" \
18 --file "$FOSSILS_YAML" "$@"
35 local fossil
="${1//,/?}"
36 echo -n "[fetch_fossil] Fetching $1... "
37 local output
=$
(git lfs pull
-I "$fossil" 2>&1)
39 if [[ $?
-ne 0 ||
! -f "$1" ]]; then
50 if [[ -n "$(query_fossils_yaml fossils_db_repo)" ]]; then
51 clone_fossils_db
"$(query_fossils_yaml fossils_db_repo)" \
52 "$(query_fossils_yaml fossils_db_commit)"
55 echo "Warning: No fossils-db entry in $FOSSILS_YAML, assuming fossils-db is current directory"
58 # During git operations various git objects get created which
59 # may take up significant space. Store a clean .git instance,
60 # which we restore after various git operations to keep our
61 # storage consumption low.
64 for fossil
in $
(query_fossils_yaml fossils
)
66 fetch_fossil
"$fossil" ||
exit $?
67 fossilize-replay
$fossil ||
exit $?