Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | T="$1" |
| 4 | |
Junio C Hamano | 530e741 | 2007-11-24 23:48:04 -0800 | [diff] [blame] | 5 | for h in \ |
| 6 | *.txt *.html \ |
| 7 | howto/*.txt howto/*.html \ |
| 8 | technical/*.txt technical/*.html \ |
Nicolas Pitre | 761e742 | 2010-09-06 20:29:57 -0400 | [diff] [blame] | 9 | RelNotes/*.txt *.css |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 10 | do |
Junio C Hamano | 530e741 | 2007-11-24 23:48:04 -0800 | [diff] [blame] | 11 | if test ! -f "$h" |
| 12 | then |
| 13 | : did not match |
| 14 | elif test -f "$T/$h" && |
Junio C Hamano | 7e42332 | 2010-09-01 09:25:17 -0700 | [diff] [blame] | 15 | $DIFF -u -I'^Last updated ' "$T/$h" "$h" |
Tilman Sauerbeck | 52db049 | 2006-05-18 12:57:04 +0200 | [diff] [blame] | 16 | then |
| 17 | :; # up to date |
| 18 | else |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 19 | echo >&2 "# install $h $T/$h" |
| 20 | rm -f "$T/$h" |
Elia Pinto | 2c4a050 | 2014-04-16 10:29:46 -0700 | [diff] [blame] | 21 | mkdir -p $(dirname "$T/$h") |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 22 | cp "$h" "$T/$h" |
Tilman Sauerbeck | 52db049 | 2006-05-18 12:57:04 +0200 | [diff] [blame] | 23 | fi |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 24 | done |
Elia Pinto | 2c4a050 | 2014-04-16 10:29:46 -0700 | [diff] [blame] | 25 | strip_leading=$(echo "$T/" | sed -e 's|.|.|g') |
Junio C Hamano | 530e741 | 2007-11-24 23:48:04 -0800 | [diff] [blame] | 26 | for th in \ |
| 27 | "$T"/*.html "$T"/*.txt \ |
| 28 | "$T"/howto/*.txt "$T"/howto/*.html \ |
| 29 | "$T"/technical/*.txt "$T"/technical/*.html |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 30 | do |
Elia Pinto | 2c4a050 | 2014-04-16 10:29:46 -0700 | [diff] [blame] | 31 | h=$(expr "$th" : "$strip_leading"'\(.*\)') |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 32 | case "$h" in |
Junio C Hamano | 3a4e6c7 | 2010-09-09 16:17:59 -0700 | [diff] [blame] | 33 | RelNotes-*.txt | index.html) continue ;; |
Junio C Hamano | e6fc234 | 2005-08-25 00:28:18 -0700 | [diff] [blame] | 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" |