reword the detached head message a little again
[git/platforms.git] / Documentation / install-webdoc.sh
blob60211a5058da658a92d99bd1d970b742dddb4e61
1 #!/bin/sh
3 T="$1"
5 for h in *.html *.txt howto/*.txt howto/*.html
6 do
7 if test -f "$T/$h" &&
8 diff -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h"
9 then
10 :; # up to date
11 else
12 echo >&2 "# install $h $T/$h"
13 rm -f "$T/$h"
14 mkdir -p `dirname "$T/$h"`
15 cp "$h" "$T/$h"
17 done
18 strip_leading=`echo "$T/" | sed -e 's|.|.|g'`
19 for th in "$T"/*.html "$T"/*.txt "$T"/howto/*.txt "$T"/howto/*.html
21 h=`expr "$th" : "$strip_leading"'\(.*\)'`
22 case "$h" in
23 index.html) continue ;;
24 esac
25 test -f "$h" && continue
26 echo >&2 "# rm -f $th"
27 rm -f "$th"
28 done
29 ln -sf git.html "$T/index.html"