#!/bin/sh . "$_EXEC/cgilite/cgilite.sh" . "$_EXEC/tools.sh" . "$_EXEC/acl.sh" LANGUAGES='' glob="/" depth=-1 while [ $# -gt 0 ]; do case $1 in --system) glob_system_pages=true; shift 1;; :*) LANGUAGES="${LANGUAGES}${LANGUAGES:+ }${1#:}"; shift 1;; --depth) depth="$2"; shift 2;; *) glob="$1"; shift 1;; esac; done page='' page_abs='' ostamp='' odate='' lstamp='' ldate='' row='' rowstate='' printf '\n' for l in $LANGUAGES; do printf '' "$l"; done printf '\n\n' page_glob "$glob" "$depth" |while read page; do page_abs="$(page_abs "$page")" acl_read "${page_abs}" || continue read ostamp odate <<-EOF $(git -C "$_DATA" log --pretty="format:%at %ai" -- "pages${page_abs}#page.md") EOF row="" rowstate='' for l in $LANGUAGES; do if [ -f "${_DATA}/pages/${page}:${l}/#page.md" ]; then read lstamp ldate <<-EOF $(git -C "$_DATA" log --pretty="format:%at %ai" -- "pages$(page_abs "${page_abs}:${l}")/#page.md") EOF if [ $lstamp -lt $ostamp ] 2>&-; then row="${row}" [ "$rowstate" = "${rowstate%*outdated*}" ] && rowstate="${rowstate}${rowstate:+ }outdated" else row="${row}" [ "$rowstate" = "${rowstate%*current*}" ] && rowstate="${rowstate}${rowstate:+ }current" fi else row="${row}" [ "$rowstate" = "${rowstate%*missing*}" ] && rowstate="${rowstate}${rowstate:+ }missing" fi done printf '%s\n' "$rowstate" "$row" done printf '
Page%s
$(HTML "$page")${odate%% +*}outdated${ldate%% +*}current${ldate%% +*}missing
'