#!/usr/bin/env printf "This file should not be marked executable" function eschtml () { sed 's/&/\&/g; 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 "
" >>./.index.html if [ -e tt.c ] then echo "
" >>./.index.html cc tt.c && ./a.out kanban >>./.index.html; rm a.out fi rm index.html echo "
" >>./.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 "
" >>./.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 "
" >>./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]}"