#!/usr/bin/env printf "This file should not be marked executable" function eschtml () { sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/g' } function update { git reset --hard git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done git fetch --all git pull echo "Public data for mail.swiley.net

Readme.html

">./.head.html cat .head.html readme.html >.index.html rm .head.html rm branches.html echo "
" >>./.index.html
	if [ -e tt.c ]
	then
		echo "

Scrum Board

" >>./.index.html
		cc tt.c && ./a.out kanban >>./.index.html; rm a.out
	fi
	rm index.html
	echo "

Reposotory data

" >>./.index.html
	tree | awk '/^ *(│|├|─|└)+.*/{
    pretext=$0
    gsub(/│/,"")
    gsub(/(│|├|─|└)+/," ")
    findent = length($0)
    gsub(/^( | )+/,"")
    gsub(/^[[:space:]]+/,"")
    indent=int((findent-length($0))/4+1)
    path[indent] = $0

    for (i = indent + 1; i <= prev_indent; i++) {
        delete path[i]
    }

    prev_indent = indent

    full_path = "."
    for (i = 1; i <= indent; i++) {
        full_path = full_path "/" path[i]
    }

    print "" pretext ""
    next
}
{print $0}
' >>./.index.html
	du -sh >>./.index.html
	git branch >>./.index.html
	echo "

Go to Mergable branches" >>./.index.html echo "

Commits

" >>./.index.html
	git log --oneline | eschtml >>./.index.html
	if [ -e ci.sh ]
	then
		d="$(date +%s)"
		(./ci.sh >./ci.$d.log >>./.index.html) & #even after the move it should be fine.
	fi
	echo -n "

Updated and copyright " >>./.index.html date >>./.index.html mv .index.html index.html cd .git && git update-server-info && cd .. } function branches () { rm branches.html echo "Branches" >./branches.html echo "

Branches

" >>./branches.html for branch in $(git branch --no-merged) do echo "

diff for $branch

" >>./branches.html
		if which ansi2html
		then
		git diff -R --color "$branch" | eschtml |ansi2html -w -n >>./branches.html
		else
		git diff -R "$branch"  | eschtml >>./branches.html
		fi
		echo "
" >>./branches.html done } update branches inotifywait -r "$(git config --get remote.origin.url)"; sleep 5 exec bash "${BASH_SOURCE[0]}"