Re: [PATCH] doc: git-htmldocs.googlecode.com is no more
- From
- Eric Wong <e@80x24.org>
- Date
- Jun 22, 2016, 21:48 UTC
- Message-ID
- <20160622214811.GA19633@dcvr.yhbt.net>
- In-Reply-To
- <CAPc5daUiUv-EEv7ouQ=K+Q8S64QVV5wn4H6+TuF0wLeo123K5Q@mail.gmail.com>
Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> On Wed, Jun 22, 2016 at 12:00 PM, Eric Wong <e@80x24.org> wrote: > > > > Just wondering, who updates > > https://kernel.org/pub/software/scm/git/docs/ > > and why hasn't it been updated in a while? > > (currently it says Last updated 2015-06-06 at the bottom) > > Nobody. It is too cumbersome to use their upload tool to update many > files (it is geared towards updating a handful of tarballs at a time).
Alright, I've setup https://git-htmldocs.bogomips.org/ for my own usage, at least. It should check for updates twice an hour(*), and plain HTTP is also available in case Let's Encrypt goes away.
Can't hurt to have more mirrors: ----------------------8<--------------------- #!/bin/sh set -e DST=/path/to/server-docroot/git-htmldocs # my mirror of git://git.kernel.org/pub/scm/git/git-htmldocs.git: GIT_DIR=/path/to/mirrors/git-htmldocs.git export GIT_DIR
# rsync from a temporary dir for atomicity so nobody fetches # a partially written file tmp="$(mktemp -t -d htmldocs.XXXXXXX)" git archive --format=tar HEAD | tar x -C "$tmp" chmod 755 "$tmp" rsync -a "$tmp/" "$DST/" rm -rf "$tmp"
# for servers which support pre-gzipped files (e.g. gzip_static in nginx)
find "$DST" -type f -name '*.html' -o -name '*.txt' | while read file
do
gz="$file.gz"
if ! test -e "$gz" || test "$gz" -ot "$file"
then
gztmp="$gz.$$.tmp"
gzip -9 <"$file" >"$gztmp"
touch -r "$file" "$gztmp"
mv "$gztmp" "$gz"
fi
done
---
(*) On a side note, It would be nice to something like IMAP IDLE
for real-time updates of mirrors.