Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sanity-check28
1 files changed, 27 insertions, 1 deletions
diff --git a/bin/sanity-check b/bin/sanity-check
index 34c4df0..5ea844a 100755
--- a/bin/sanity-check
+++ b/bin/sanity-check
@@ -62,13 +62,39 @@ tmp_dir=$(mktemp -d)
trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
if [ $# -eq 0 ]; then
- set -- build-list repos package-database state-files
+ set -- git-repositories build-list repos package-database state-files
fi
while [ $# -gt 0 ]; do
case "$1" in
+ git-repositories)
+
+ [ ${silence} -gt 0 ] || \
+ >&2 printf 'checking git repositories ...'
+
+ for repo in ${repo_names}; do
+ eval 'repo_path="${repo_paths__'"${repo}"'}"'
+ repo_revision=$(
+ cat "${work_dir}/${repo}.revision"
+ )
+ if ! git -C "${repo_path}" archive "${repo_revision}" -- | \
+ tar -t > /dev/null; then
+ if [ ${silence} -le 1 ]; then
+ echo
+ printf 'The repository %s (%s) cannot archive the current revision %s.\n' \
+ "${repo}" "${repo_path}" "${repo_revision}"
+ fi
+ i_am_insane
+ fi
+ done
+
+ [ ${silence} -gt 0 ] || \
+ >&2 echo ' passed.'
+
+ ;;
+
build-list)
[ ${silence} -gt 0 ] || \