mirror of
https://github.com/dokku/buildpack-nginx.git
synced 2024-11-05 11:48:42 +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
18
bin/compile
18
bin/compile
@ -19,14 +19,16 @@ CUR_DIR=`cd $(dirname $0); cd ..; pwd`
|
||||
|
||||
mkdir -p $BUILD_DIR $CACHE_DIR
|
||||
|
||||
echo "-----> copy static files to www"
|
||||
rm -rf $CACHE_DIR/www
|
||||
mkdir -p $CACHE_DIR/www
|
||||
mv $BUILD_DIR/* $CACHE_DIR/www
|
||||
mkdir -p $BUILD_DIR/www
|
||||
mv $CACHE_DIR/www/* $BUILD_DIR/www
|
||||
[[ -f "$BUILD_DIR/www/CHECKS" ]] && mv $BUILD_DIR/www/CHECKS $BUILD_DIR
|
||||
rm -rf $CACHE_DIR/www
|
||||
if [[ ! -e "$BUILD_DIR/www" ]]; then
|
||||
echo "-----> copy static files to www"
|
||||
rm -rf $CACHE_DIR/www
|
||||
mkdir -p $CACHE_DIR/www
|
||||
mv $BUILD_DIR/* $CACHE_DIR/www
|
||||
mkdir -p $BUILD_DIR/www
|
||||
mv $CACHE_DIR/www/* $BUILD_DIR/www
|
||||
[[ -f "$BUILD_DIR/www/CHECKS" ]] && mv $BUILD_DIR/www/CHECKS $BUILD_DIR
|
||||
rm -rf $CACHE_DIR/www
|
||||
fi
|
||||
|
||||
cd $CACHE_DIR
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user