From 4fd8893bffd47a80aef0c5064dbed6f3b237d020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Wollse=CC=81n?= Date: Mon, 18 Aug 2014 09:46:33 +0300 Subject: [PATCH] Added support for optional file custom-nginx-install --- README.md | 1 + bin/compile | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5ea1e3..2691340 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ * nginx.conf.erb - Optional File: overrides `conf/nginx.conf.erb` * mime.types - Optional File: overrides `conf/mime.types` * custom-build - Optional File: executes commands before build is finished. Note that this script does not run in the application root. To execute commands in the application root you must do `cd "$1"`. +* custom-nginx-install - Optional File: executed where nginx otherwise would be installed via a default apt-get installation ## Environment Variables * root - Optional: overrides root directory diff --git a/bin/compile b/bin/compile index e7078dd..806af5f 100755 --- a/bin/compile +++ b/bin/compile @@ -1,8 +1,12 @@ #!/usr/bin/env bash set -e -apt-get update -apt-get -y install nginx +if [[ -e $1/${CUSTOM_NGINX_INSTALL:-custom-nginx-install} ]]; then + $1/${CUSTOM_NGINX_INSTALL:-custom-nginx-install} "$@" +else + apt-get update + apt-get -y install nginx +fi BINDIR=$(dirname "$0")