1
0
mirror of https://github.com/dokku/buildpack-nginx.git synced 2024-11-25 18:33:05 +00:00

Merge pull request #2 from beedesk/master

Made script only copy web files from root when `www` folder is unavailable
This commit is contained in:
Florian Heinemann 2015-01-05 15:48:57 -05:00
commit d94786dcdf

View File

@ -19,14 +19,16 @@ CUR_DIR=`cd $(dirname $0); cd ..; pwd`
mkdir -p $BUILD_DIR $CACHE_DIR mkdir -p $BUILD_DIR $CACHE_DIR
echo "-----> copy static files to www" if [[ ! -e "$BUILD_DIR/www" ]]; then
rm -rf $CACHE_DIR/www echo "-----> copy static files to www"
mkdir -p $CACHE_DIR/www rm -rf $CACHE_DIR/www
mv $BUILD_DIR/* $CACHE_DIR/www mkdir -p $CACHE_DIR/www
mkdir -p $BUILD_DIR/www mv $BUILD_DIR/* $CACHE_DIR/www
mv $CACHE_DIR/www/* $BUILD_DIR/www mkdir -p $BUILD_DIR/www
[[ -f "$BUILD_DIR/www/CHECKS" ]] && mv $BUILD_DIR/www/CHECKS $BUILD_DIR mv $CACHE_DIR/www/* $BUILD_DIR/www
rm -rf $CACHE_DIR/www [[ -f "$BUILD_DIR/www/CHECKS" ]] && mv $BUILD_DIR/www/CHECKS $BUILD_DIR
rm -rf $CACHE_DIR/www
fi
cd $CACHE_DIR cd $CACHE_DIR