Merge branch 'fixes'
[git/jnareb-git.git] / Documentation / install-webdoc.sh
blobd593ab988be48ba9f9d910e9fdbc73e2837241cc
1 #!/bin/sh
3 T="$1"
5 for h in *.html howto/*.txt howto/*.html
6 do
7 diff -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h" || {
8 echo >&2 "# install $h $T/$h"
9 rm -f "$T/$h"
10 mkdir -p `dirname "$T/$h"`
11 cp "$h" "$T/$h"
13 done
14 strip_leading=`echo "$T/" | sed -e 's|.|.|g'`
15 for th in "$T"/*.html "$T"/howto/*.txt "$T"/howto/*.html
17 h=`expr "$th" : "$strip_leading"'\(.*\)'`
18 case "$h" in
19 index.html) continue ;;
20 esac
21 test -f "$h" && continue
22 echo >&2 "# rm -f $th"
23 rm -f "$th"
24 done
25 ln -sf git.html "$T/index.html"