parse-options: option to let --git-completion-helper show negative form
[git/debian.git] / Documentation / install-webdoc.sh
blobed8b4ff3e5874eac2f8ffe3486abe9d9668b27ce
1 #!/bin/sh
3 T="$1"
5 for h in \
6 *.txt *.html \
7 howto/*.txt howto/*.html \
8 technical/*.txt technical/*.html \
9 RelNotes/*.txt *.css
11 if test ! -f "$h"
12 then
13 : did not match
14 elif test -f "$T/$h" &&
15 $DIFF -u -I'^Last updated ' "$T/$h" "$h"
16 then
17 :; # up to date
18 else
19 echo >&2 "# install $h $T/$h"
20 rm -f "$T/$h"
21 mkdir -p $(dirname "$T/$h")
22 cp "$h" "$T/$h"
24 done
25 strip_leading=$(echo "$T/" | sed -e 's|.|.|g')
26 for th in \
27 "$T"/*.html "$T"/*.txt \
28 "$T"/howto/*.txt "$T"/howto/*.html \
29 "$T"/technical/*.txt "$T"/technical/*.html
31 h=$(expr "$th" : "$strip_leading"'\(.*\)')
32 case "$h" in
33 RelNotes-*.txt | index.html) continue ;;
34 esac
35 test -f "$h" && continue
36 echo >&2 "# rm -f $th"
37 rm -f "$th"
38 done
39 ln -sf git.html "$T/index.html"