What's cooking (2014/03 #08)
[alt-git.git] / Gitweb
blob56b7e822d188f5caec81e1e3c75b56bad40f2e3a
1 #!/bin/sh
3 Meta/Make gitweb/gitweb.cgi
5 cd gitweb &&
6 DEST=`cd ../../index && /bin/pwd` || exit
8 differs=
9 rsrc='gitweb.cgi gitweb.css git-favicon.png'
11 for r in $rsrc
14 test -f "$DEST/$r" && diff -u "$DEST/$r" "$r" && continue
15 differs="$differs$r "
16 done
18 case "$differs" in
19 '')
20 echo Up to date. ;;
22 while echo -n 'Update [y/N]? '
24 read ans
25 case "$ans" in
26 [Yy])
27 ans=y
28 break ;;
29 '' | [Nn])
30 ans=n
31 break ;;
32 esac
33 done
34 case "$ans" in
35 y) ;;
36 *) exit
37 esac
38 esac
40 for r in $differs
42 cp "$r" "$DEST/$r"
43 case "$r" in
44 gitweb.cgi)
45 chmod +x "$DEST/$r"
46 esac
47 done