From 343a02f44fdfd8574a7093f48c64edee2a39e08e Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Tue, 26 Jan 2021 23:43:15 -0500 Subject: [PATCH] [provisioning] Only install mu if unavailable --- recipes/email | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/recipes/email b/recipes/email index c737da4..34560ef 100644 --- a/recipes/email +++ b/recipes/email @@ -111,18 +111,20 @@ case $_PLATFORM in done dir=`mktemp -d` && \ pushd $dir >/dev/null - echo "[tgz] Fetching mu" - curl -sL https://github.com/djcb/mu/archive/master.tar.gz \ - | tar xz --strip 1 && \ - echo "[tgz] Configuring mu" && \ - ./autogen.sh >/dev/null 2>&1 && \ - ./configure --prefix=/usr >/dev/null 2>&1 && \ - echo "[tgz] Building mu" && \ - make >/dev/null 2>&1 && \ - echo "[tgz] Installing mu" && \ - sudo make install >/dev/null 2>&1 - popd >/dev/null - rm -rf "$dir" + if ! command -v mu >/dev/null; then + echo "[tgz] Fetching mu" + curl -sL https://github.com/djcb/mu/archive/master.tar.gz \ + | tar xz --strip 1 && \ + echo "[tgz] Configuring mu" && \ + ./autogen.sh >/dev/null 2>&1 && \ + ./configure --prefix=/usr >/dev/null 2>&1 && \ + echo "[tgz] Building mu" && \ + make >/dev/null 2>&1 && \ + echo "[tgz] Installing mu" && \ + sudo make install >/dev/null 2>&1 + popd >/dev/null + rm -rf "$dir" + fi ;; esac