From 9e128992484ff7e5b4426ec3ce9b25fb79197ee0 Mon Sep 17 00:00:00 2001 From: mieciu Date: Tue, 20 Jan 2015 14:45:17 +0100 Subject: [PATCH 1/2] Update compile to look for configfile in repo root --- bin/compile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index cd030263..b9f58493 100755 --- a/bin/compile +++ b/bin/compile @@ -14,10 +14,11 @@ mkdir -p "$1/config" cp config/mime.types "$1/config/" echo '-----> nginx-buildpack: Default mime.types copied to app/config/' -if [[ ! -f $1/config/nginx.conf.erb ]]; then +if [[ ! -f $1/nginx.conf.erb ]]; then cp config/nginx.conf.erb "$1/config/" echo '-----> nginx-buildpack: Default config copied to app/config.' else - echo '-----> nginx-buildpack: Custom config found in app/config.' + cp $1/nginx.conf.erb "$1/config/" + echo '-----> nginx-buildpack: Custom config found in app/.' fi exit 0 From 216a10e680cf05282cd1de9eb46a6446775e73b8 Mon Sep 17 00:00:00 2001 From: mieciu Date: Tue, 20 Jan 2015 17:05:31 +0100 Subject: [PATCH 2/2] Update compile Make code more readable --- bin/compile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/compile b/bin/compile index b9f58493..888fe695 100755 --- a/bin/compile +++ b/bin/compile @@ -14,11 +14,11 @@ mkdir -p "$1/config" cp config/mime.types "$1/config/" echo '-----> nginx-buildpack: Default mime.types copied to app/config/' -if [[ ! -f $1/nginx.conf.erb ]]; then - cp config/nginx.conf.erb "$1/config/" - echo '-----> nginx-buildpack: Default config copied to app/config.' -else +if [[ -f $1/nginx.conf.erb ]]; then cp $1/nginx.conf.erb "$1/config/" echo '-----> nginx-buildpack: Custom config found in app/.' +else + cp config/nginx.conf.erb "$1/config/" + echo '-----> nginx-buildpack: Default config copied to app/config.' fi exit 0