overdue commit lots of changes
[buildscripts] / mu4e
diff --git a/mu4e b/mu4e
index 5673bb5b4e0d27528366a41456705701f258f6a9..d70e6eda9c9e2c1a2a8fbbcedfd2085be4da4a4a 100755 (executable)
--- a/mu4e
+++ b/mu4e
@@ -51,8 +51,15 @@ if [[ -e $dir ]]; then
   rev=$(cat $last_build 2>/dev/null) ||:
   head=$(git rev-parse HEAD)
   if ! $recompile && ! $bootstrap && [[ $rev == "$head" ]]; then
-    echo "already compiled, exiting"
-    exit 0
+    echo "already compiled"
+    installed_info=$(file $(readlink -f $(type -P mu)))
+    build_info=$(file $dir/build/mu/mu)
+    if [[ $installed_info == "$build_info" ]]; then
+      echo "already installed exiting"
+      # this isn't perfect, because install could partially fail or the
+      # command after it could
+      exit 0
+    fi
   fi
   echo rev=$rev head=$head
   if [[ $rev != "$head" ]]; then