overdue commit lots of changes
[buildscripts] / emacs
diff --git a/emacs b/emacs
index 01a66005036402d2b71a0564e07462630a93ad36..5fe4e2f4222a3e414aefa80d5385c58084d1501c 100755 (executable)
--- a/emacs
+++ b/emacs
@@ -112,8 +112,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 emacs)))
+    build_info=$(file $dir/src/emacs)
+    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
   if [[ $rev != "$head" ]]; then
     bootstrap=true