X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=system-status;h=25a637ee9606788c97e22949b470a811428abf16;hp=c6f3fe7f5144d3c3661196289cc8cfbb062059ed;hb=7e4f3d0a6130b69b7f76a3ff13e510ffbeb1484b;hpb=6f1f8a104c9b38936ade2d27e835479523985133 diff --git a/system-status b/system-status index c6f3fe7..25a637e 100755 --- a/system-status +++ b/system-status @@ -35,6 +35,39 @@ write-status() { chars+=("MAILPING!") fi + + if ! make -q ~/.local/distro-begin || [[ $(<~/.local/distro-begin) != 0 ]]; then + chars+=("DISTRO-BEGIN!") + fi + + if ! make -q ~/.local/distro-end || [[ $(<~/.local/distro-end) != 0 ]]; then + chars+=("DISTRO-END!") + fi + + f=~/.local/conflink + if [[ -e $f ]]; then + cd /b/ds + now=$(date +%s) + fsec=$(stat -c%Y $f) + fmin=$(( (fsec - now ) / 60 + 1 )) + fminplus=$(( fmin + 60*24 )) + # Filesystem files get copied, so find any newer than the last run. + # The rest are hueristics: + # Given the last time we added a file in git, is that newer than the last conflink run. + # Given new files not added to git, were they modified more recently than the last conflink? but, + # push their modification time back by a day so we can develop them before needing to add them to git. + if (( $(date -d "$(git log --diff-filter=ACR --format=%aD -1)" +%s) > fsec )) || \ + [[ $(find {/a/bin/ds,/p/c}{/filesystem,/machine_specific/$HOSTNAME/filesystem} -mmin $fmin -type f -print -quit 2>/dev/null) ]] \ + || [[ $(find $(git ls-files -o --exclude-standard) -mmin $fminplus -type f -print -quit) ]]; then + chars+=("CONFLINK!") + fi + fi + + if [[ ! -e $f || $(<$f) != 0 ]]; then + chars+=("CONFLINK!") + fi + + ## Clean the paniclog, but only up to 4 times per day, or else we ## should investigate. loglog=/tmp/panicloglog-$(date --rfc-3339=date)