From a8029bf427710e5a6e137ec66760d3f2c79d9d98 Mon Sep 17 00:00:00 2001 From: Rodrigo Passos Date: Thu, 26 Oct 2017 00:22:39 -0400 Subject: [PATCH] check if nginx-partials are in place before installing --- scripts/craft_do_forge_recipe.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/craft_do_forge_recipe.sh b/scripts/craft_do_forge_recipe.sh index eee2336..78ae50b 100644 --- a/scripts/craft_do_forge_recipe.sh +++ b/scripts/craft_do_forge_recipe.sh @@ -54,9 +54,14 @@ install_imager_req () { # Install the nginx partials from https://github.com/nystudio107/nginx-craft install_nginx_partials () { - git clone https://github.com/nystudio107/nginx-craft.git nginx-craft; - cp -R nginx-craft/nginx-partials /etc/nginx; - rm -rf nginx-craft; + if [ ! -d "/etc/nginx/nginx-partials" ]; then + print_msg "Installing nginx-partials" + git clone https://github.com/nystudio107/nginx-craft.git nginx-craft; + cp -R nginx-craft/nginx-partials /etc/nginx; + rm -rf nginx-craft; + fi + + success_msg "nginx-partials installed!" }