diff --git a/scripts/git-static-index.sh b/scripts/git-static-index.sh new file mode 100755 index 00000000..fb9ac4e5 --- /dev/null +++ b/scripts/git-static-index.sh @@ -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 '' +echo '' +git log --pretty='%H%n%an<%ae>%n%ad%n%s' --date=format:'%r
%d-%m-%Y' | while read HASH +do + HASH="${HASH::12}" + read AUTHOR + AUTHOR1="${AUTHOR/<*/}" + AUTHOR1="${AUTHOR1::17}" + AUTHOR2="<${AUTHOR/*" +done +echo "
commitauthordatedescription
$HASH$AUTHOR1
$AUTHOR2
$DATE$DESC
"