repo.or.cz
/
git.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
What's cooking (2015/03 #03)
[git.git]
/
Gitweb
blob
56b7e822d188f5caec81e1e3c75b56bad40f2e3a
1
#!/bin/sh
2
3
Meta
/
Make gitweb
/
gitweb.cgi
4
5
cd
gitweb
&&
6
DEST
=
`cd ../../index && /bin/pwd`
||
exit
7
8
differs
=
9
rsrc
=
'gitweb.cgi gitweb.css git-favicon.png'
10
11
for
r
in
$rsrc
12
do
13
14
test -f
"
$DEST
/
$r
"
&&
diff
-u
"
$DEST
/
$r
"
"
$r
"
&&
continue
15
differs
=
"
$differs
$r
"
16
done
17
18
case
"
$differs
"
in
19
''
)
20
echo
Up to
date
.
;;
21
*)
22
while
echo -n
'Update [y/N]? '
23
do
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
39
40
for
r
in
$differs
41
do
42
cp
"
$r
"
"
$DEST
/
$r
"
43
case
"
$r
"
in
44
gitweb.cgi
)
45
chmod
+
x
"
$DEST
/
$r
"
46
esac
47
done