projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dodoc: adjust to "git add ." complaints.
[git.git]
/
dodoc.sh
diff --git
a/dodoc.sh
b/dodoc.sh
index
2bb0880
..
15926f3
100755
(executable)
--- a/
dodoc.sh
+++ b/
dodoc.sh
@@
-1,7
+1,7
@@
#!/bin/sh
#
# This script is called from the post-update hook, and when
#!/bin/sh
#
# This script is called from the post-update hook, and when
-# the master branch is updated, run in $HOME/
doc-git
, like
+# the master branch is updated, run in $HOME/
git-doc
, like
# this:
: <<\END_OF_COMMENTARY
# this:
: <<\END_OF_COMMENTARY
@@
-17,7
+17,7
@@
$ chmod +x hooks/post-update
END_OF_COMMENTARY
END_OF_COMMENTARY
-# $HOME/
doc-git
is a clone of the git.git repository and
+# $HOME/
git-doc
is a clone of the git.git repository and
# has the master branch checkd out. We update the working
# tree and build pre-formatted documentation pages, install
# in doc-htmlpages and doc-manapges subdirectory here.
# has the master branch checkd out. We update the working
# tree and build pre-formatted documentation pages, install
# in doc-htmlpages and doc-manapges subdirectory here.
@@
-36,7
+36,10
@@
test "$DOCREPO" != "" &&
cd "$DOCREPO" || exit $?
git pull "$MASTERREPO" master &&
cd "$DOCREPO" || exit $?
git pull "$MASTERREPO" master &&
-test $(git-rev-parse --verify refs/heads/master) == "$ID" || exit $?
+git fetch --tags "$MASTERREPO" || exit $?
+test $(git-rev-parse --verify refs/heads/master) == "$ID" &&
+NID=$(git-describe --abbrev=4 "$ID") &&
+test '' != "$NID" || exit $?
# Set up subrepositories
test -d doc-htmlpages || (
# Set up subrepositories
test -d doc-htmlpages || (
@@
-44,9
+47,9
@@
test -d doc-htmlpages || (
cd doc-htmlpages &&
git init-db || exit $?
cd doc-htmlpages &&
git init-db || exit $?
- if ID=$(git fetch-pack "$MASTERREPO" html)
+ if
S
ID=$(git fetch-pack "$MASTERREPO" html)
then
then
- git update-ref HEAD `expr "$ID" : '\(.*\) .*'` &&
+ git update-ref HEAD `expr "$
S
ID" : '\(.*\) .*'` &&
git checkout || exit $?
fi
)
git checkout || exit $?
fi
)
@@
-55,9
+58,9
@@
test -d doc-manpages || (
cd doc-manpages &&
git init-db || exit $?
cd doc-manpages &&
git init-db || exit $?
- if ID=$(git fetch-pack "$MASTERREPO" man)
+ if
S
ID=$(git fetch-pack "$MASTERREPO" man)
then
then
- git update-ref HEAD `expr "$ID" : '\(.*\) .*'` &&
+ git update-ref HEAD `expr "$
S
ID" : '\(.*\) .*'` &&
git checkout || exit $?
fi
)
git checkout || exit $?
fi
)
@@
-75,8
+78,8
@@
else
fi || exit $?
cd ../doc-htmlpages &&
fi || exit $?
cd ../doc-htmlpages &&
-
git add .
&&
- if git commit -a -m "Autogenerated HTML docs for $ID"
+
(git add . || echo no new files -- not a big deal)
&&
+ if git commit -a -m "Autogenerated HTML docs for $
N
ID"
then
git-send-pack "$MASTERREPO" master:refs/heads/html || {
echo "* HTML failure"
then
git-send-pack "$MASTERREPO" master:refs/heads/html || {
echo "* HTML failure"
@@
-91,8
+94,8
@@
make man1="$DOCREPO/doc-manpages/man1" man7="$DOCREPO/doc-manpages/man7" \
install >../:man.log 2>&1 &&
cd ../doc-manpages &&
install >../:man.log 2>&1 &&
cd ../doc-manpages &&
-
git add .
&&
- if git commit -a -m "Autogenerated man pages for $ID"
+
(git add . || echo no new files -- not a big deal)
&&
+ if git commit -a -m "Autogenerated man pages for $
N
ID"
then
git-send-pack "$MASTERREPO" master:refs/heads/man || {
echo "* man failure"
then
git-send-pack "$MASTERREPO" master:refs/heads/man || {
echo "* man failure"