mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2025-01-28 01:52:26 +00:00
Made script only copy web file from root when www
folder is not available.
This commit is contained in:
parent
d8e108e21e
commit
746b5b88ea
18
bin/compile
18
bin/compile
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user