Merge pull request #11 from kmattimo/master

restored ability to use custom mime.types
This commit is contained in:
Florian Heinemann 2015-12-24 13:17:24 +01:00
commit 9d273c7607
1 changed files with 11 additions and 5 deletions

View File

@ -26,8 +26,9 @@ if [[ ! -e "$BUILD_DIR/www" ]]; then
mv $BUILD_DIR/* $CACHE_DIR/www mv $BUILD_DIR/* $CACHE_DIR/www
mkdir -p $BUILD_DIR/www mkdir -p $BUILD_DIR/www
mv $CACHE_DIR/www/* $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/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 [[ -f "$BUILD_DIR/www/CHECKS" ]] && mv $BUILD_DIR/www/CHECKS $BUILD_DIR
rm -rf $CACHE_DIR/www rm -rf $CACHE_DIR/www
fi fi
@ -130,10 +131,15 @@ else
fi fi
# build mime.types unless overridden by user # build mime.types unless overridden by user
#if [ ! -f $BUILD_DIR/mime.types ] ; then if [ -f $BUILD_DIR/mime.types ] ; then
echo "-----> using default mime.types" echo "-----> using user provided mime.types"
cp conf/mime.types $BUILD_DIR/nginx/mime.types cp $BUILD_DIR/mime.types $BUILD_DIR/nginx/mime.types
#fi
else
echo "-----> using default mime.types"
cp conf/mime.types $BUILD_DIR/nginx/mime.types
fi
# build a startup script # build a startup script
cat <<EOF >"$BUILD_DIR/start_nginx" cat <<EOF >"$BUILD_DIR/start_nginx"