aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-05 18:16:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-03-05 18:16:15 +0200
commitd8771f7a30a0628ed0b6631bd1e3365c73eab72b (patch)
treeec615794671158b29515a10a1faa9a5db54f1bbb
parentdba4c3ef42fb89aac2216c4f25af00dcecba3a38 (diff)
Sync repo description in mrrepo script
-rwxr-xr-xserver/mrrepo10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/mrrepo b/server/mrrepo
index e22e5dd..5e7d0fb 100755
--- a/server/mrrepo
+++ b/server/mrrepo
@@ -19,6 +19,10 @@
# - needs curl
# - run from cron as user scm (which belongs to the group scm).
#
+# To test, run:
+#
+# runuser -u scm -- /var/scm/mrrepo -s -v git.example.org /var/scm
+#
usage="usage: $0 [-v] [-s] <host> <path>"
owd="$(pwd)"
@@ -81,7 +85,7 @@ function fetch () # <url> [<curl-options>]
local u="$1"; shift
if [ "$verb" -ge 1 ]; then
- info "${curl_ops[@]}" "$@" "$u"
+ info curl "${curl_ops[@]}" "$@" "$u"
fi
curl "${curl_ops[@]}" "$@" "$u"
@@ -126,6 +130,10 @@ for r in "${new[@]}"; do
info git -C "$r" fetch "${git_ops[@]}" --prune --tags
fi
git -C "$r" fetch "${git_ops[@]}" --prune --tags
+
+ # Also update the description file.
+ #
+ fetch "$prot://$host/$r/description" -z "$r/description" -o "$r/description"
fi
done