mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2024-11-29 11:43: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:
commit
d94786dcdf
@ -19,6 +19,7 @@ CUR_DIR=`cd $(dirname $0); cd ..; pwd`
|
|||||||
|
|
||||||
mkdir -p $BUILD_DIR $CACHE_DIR
|
mkdir -p $BUILD_DIR $CACHE_DIR
|
||||||
|
|
||||||
|
if [[ ! -e "$BUILD_DIR/www" ]]; then
|
||||||
echo "-----> copy static files to www"
|
echo "-----> copy static files to www"
|
||||||
rm -rf $CACHE_DIR/www
|
rm -rf $CACHE_DIR/www
|
||||||
mkdir -p $CACHE_DIR/www
|
mkdir -p $CACHE_DIR/www
|
||||||
@ -27,6 +28,7 @@ mkdir -p $BUILD_DIR/www
|
|||||||
mv $CACHE_DIR/www/* $BUILD_DIR/www
|
mv $CACHE_DIR/www/* $BUILD_DIR/www
|
||||||
[[ -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
|
||||||
|
|
||||||
cd $CACHE_DIR
|
cd $CACHE_DIR
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user