diff --git a/bin/compile b/bin/compile index f003c9f..76bd78a 100755 --- a/bin/compile +++ b/bin/compile @@ -26,8 +26,9 @@ if [[ ! -e "$BUILD_DIR/www" ]]; then mv $BUILD_DIR/* $CACHE_DIR/www mkdir -p $BUILD_DIR/www mv $CACHE_DIR/www/* $BUILD_DIR/www - # Check for an copy the nginx conf file override to the build dir + # Check for a copy the nginx conf file override to the build dir [[ -f "$BUILD_DIR/www/nginx.conf.erb" ]] && mv $BUILD_DIR/www/nginx.conf.erb $BUILD_DIR + [[ -f "$BUILD_DIR/www/mime.types" ]] && mv $BUILD_DIR/www/mime.types $BUILD_DIR [[ -f "$BUILD_DIR/www/CHECKS" ]] && mv $BUILD_DIR/www/CHECKS $BUILD_DIR rm -rf $CACHE_DIR/www fi @@ -130,10 +131,15 @@ else fi # build mime.types unless overridden by user -#if [ ! -f $BUILD_DIR/mime.types ] ; then -echo "-----> using default mime.types" -cp conf/mime.types $BUILD_DIR/nginx/mime.types -#fi +if [ -f $BUILD_DIR/mime.types ] ; then + echo "-----> using user provided mime.types" + cp $BUILD_DIR/mime.types $BUILD_DIR/nginx/mime.types + +else + echo "-----> using default mime.types" + cp conf/mime.types $BUILD_DIR/nginx/mime.types +fi + # build a startup script cat <"$BUILD_DIR/start_nginx"