various fixes
[distro-setup] / system-status
index ddb5b738c28db81d1f4320ad10200de8b4f3f773..b3c22e4ea8126f1a24330b039aceef3803ed1d03 100755 (executable)
@@ -53,12 +53,22 @@ write-status() {
     chars+=("q $qlen")
   fi
 
+  begin=false
   cd /b/ds
   if ! make -q ~/.local/distro-begin || [[ $(<~/.local/distro-begin) != 0 ]]; then
-    chars+=("DISTRO-BEGIN!")
+    begin=true
   fi
 
+  end=false
   if ! make -q ~/.local/distro-end || [[ $(<~/.local/distro-end) != 0 ]]; then
+    end=true
+  fi
+
+  if $begin && $end; then
+    chars+=("DISTRO!")
+  elif $begin; then
+    chars+=("DISTRO-BEGIN!")
+  elif $end; then
     chars+=("DISTRO-END!")
   fi
 
@@ -93,6 +103,10 @@ write-status() {
 
       for d in /a/bin/distro-setup /p/c; do
         cd $d
+        if [[ ! -e .git ]]; then
+          # some hosts i dont push all of /p/c
+          continue
+        fi
         untracked=$(git ls-files -o --exclude-standard)
         if [[ $untracked && $(find $untracked -mmin $fminplus -type f -print -quit) ]]; then
           v conflink: untracked in $d
@@ -160,7 +174,7 @@ write-status() {
       fi
     done
     if (( maxtime < now - 60*60 )); then
-      chars+=("OLD-SNAPSHOT!")
+      chars+=("OLD-SNAP!")
       snapshotmsg="/o snapshot older than 1 hour"
     fi
     lo -1 old-snapshot $snapshotmsg