Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/clean-git
diff options
context:
space:
mode:
Diffstat (limited to 'bin/clean-git')
-rwxr-xr-xbin/clean-git15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/clean-git b/bin/clean-git
new file mode 100755
index 0000000..2504f2b
--- /dev/null
+++ b/bin/clean-git
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# clean git repositories
+
+# shellcheck source=conf/default.conf
+. "${0%/*}/../conf/default.conf"
+
+for repo in ${repo_names}; do
+ eval 'repo_path="${repo_paths__'"${repo}"'}"'
+ printf 'cleaning %s (%s) ...\n' \
+ "${repo}" \
+ "${repo_path}"
+ git -C "${repo_path}" gc
+ printf '... done\n'
+done