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