add terminal warning for uninstalled changes
[distro-setup] / system-status
index 3513c90863631bcc2bf20e93e6f9afaa30e7e646..09dd469606152eed4149835cc7fd2fe6af41a7a5 100755 (executable)
@@ -3,7 +3,8 @@
 # SPDX-License-Identifier: AGPL-3.0-or-later
 
 # usage: runs once every 15 seconds unless any args are passed, or we
-# then just runs once. On battery power, run once per minute.
+# then just runs once and have verbose output. On battery power, run
+# once per minute.
 
 if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi
 
@@ -267,6 +268,7 @@ write-status() {
 
   begin=false
 
+  # todo: make this robust to the case of /a not being mounted
   if ! make -C /b/ds -q ~/.local/distro-begin 2>/dev/null || [[ $(<~/.local/distro-begin) != 0 ]]; then
     begin=true
   fi
@@ -284,6 +286,7 @@ write-status() {
   elif $end; then
     chars+=(DE)
   else
+    source /a/bin/ds/script-files
     f=~/.local/conflink
     # shellcheck disable=SC2043
     for _ in 1; do
@@ -307,7 +310,7 @@ write-status() {
         done
 
         # Just because i forget a lot, -mmin -NUM means files modified <= NUM minutes ago
-        if (( fmin < 0 )) && [[ $(find ${all_dirs[@]} -mmin $fmin -type f -print -quit 2>/dev/null) ]]; then
+        if (( fmin < 0 )) && [[ $(find ${all_my_scripts[@]} ${all_dirs[@]} -mmin $fmin -type f -print -quit 2>/dev/null) ]]; then
           v conflink newer filesystem files
           chars+=(CONFLINK)
           break