mirror of
https://codeberg.org/landley/toybox.git
synced 2026-01-26 14:13:25 +00:00
Script to put something browseable in https://landley.net/toybox/git
This commit is contained in:
parent
8f8b49ffed
commit
990e0e7a40
28
scripts/git-static-index.sh
Executable file
28
scripts/git-static-index.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create very basic index.html and commit links for a static git archive
|
||||
|
||||
mkdir -p commit
|
||||
git log --pretty=%H | while read i
|
||||
do
|
||||
[ -e commit/$i ] && break
|
||||
git format-patch -1 --stdout $i > commit/$i
|
||||
ln -sf $i commit/${i::12}
|
||||
done
|
||||
|
||||
echo '<html><body><font face=monospace><table border=1 cellpadding=2>'
|
||||
echo '<tr valign=top><td>commit</td><td>author</td><td>date</td><td>description</td></tr>'
|
||||
git log --pretty='%H%n%an<%ae>%n%ad%n%s' --date=format:'%r<br />%d-%m-%Y' | while read HASH
|
||||
do
|
||||
HASH="${HASH::12}"
|
||||
read AUTHOR
|
||||
AUTHOR1="${AUTHOR/<*/}"
|
||||
AUTHOR1="${AUTHOR1::17}"
|
||||
AUTHOR2="<${AUTHOR/*</}"
|
||||
AUTHOR2="${AUTHOR2::20}"
|
||||
read DATE
|
||||
DATE="${DATE/ / }"
|
||||
read DESC
|
||||
echo "<tr valign=top><td><a href=commit/$HASH>$HASH</a></td><td>$AUTHOR1<br />$AUTHOR2</td><td>$DATE</td><td>$DESC</td></tr>"
|
||||
done
|
||||
echo "</table></body></html>"
|
||||
Loading…
x
Reference in New Issue
Block a user