diff --git a/packs/fetch/build/init.sh b/packs/fetch/build/init.sh index a913a0a..2d1fb79 100644 --- a/packs/fetch/build/init.sh +++ b/packs/fetch/build/init.sh @@ -44,7 +44,8 @@ echo "========== write startupscripts based on Procfile" if [ ! -f init_build.sh ]; then if [ -f Procfile ]; then BUILD_CMD=$(cat Procfile | grep build | awk -F ": " '{print $2}') - else + fi + if [ -z "$BUILD_CMD" ]; then BUILD_CMD=$KUBERO_BUILDPACK_DEFAULT_BUILD_CMD fi echo init-build.sh @@ -55,7 +56,8 @@ fi if [ ! -f init-web.sh ]; then if [ -f Procfile ]; then WEB_CMD=$(cat Procfile | grep web | awk -F ": " '{print $2}') - else + fi + if [ -z "$WEB_CMD" ]; then WEB_CMD=$KUBERO_BUILDPACK_DEFAULT_RUN_CMD fi echo init-web.sh @@ -66,7 +68,8 @@ fi if [ ! -f init-worker.sh ]; then if [ -f Procfile ]; then WORKER_CMD=$(cat Procfile | grep worker | awk -F ": " '{print $2}') - else + fi + if [ -z "$WORKER_CMD" ]; then WORKER_CMD=$KUBERO_BUILDPACK_DEFAULT_RUN_CMD fi echo init-worker.sh