From 8841cb963f2ade40f32a8c5a6d2ec9aa31c7a44b Mon Sep 17 00:00:00 2001 From: Lev Date: Mon, 8 Nov 2021 20:11:10 +0300 Subject: [PATCH] chore(erpnext-nginx): Fix linting --- build/erpnext-nginx/install_app.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build/erpnext-nginx/install_app.sh b/build/erpnext-nginx/install_app.sh index d3e30769..afcd8a98 100755 --- a/build/erpnext-nginx/install_app.sh +++ b/build/erpnext-nginx/install_app.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + APP_NAME=${1} APP_REPO=${2} APP_BRANCH=${3} @@ -13,27 +15,28 @@ echo -ne "frappe\n${APP_NAME}" >/home/frappe/frappe-bench/sites/apps.txt mkdir -p apps cd apps -git clone --depth 1 https://github.com/frappe/frappe -b ${FRAPPE_BRANCH} -git clone --depth 1 ${APP_REPO} ${BRANCH} ${APP_NAME} +git clone --depth 1 https://github.com/frappe/frappe -b "${FRAPPE_BRANCH}" +# shellcheck disable=SC2086 +git clone --depth 1 "${APP_REPO}" ${BRANCH} "${APP_NAME}" echo "Install frappe NodeJS dependencies . . ." cd /home/frappe/frappe-bench/apps/frappe yarn echo "Install ${APP_NAME} NodeJS dependencies . . ." -cd /home/frappe/frappe-bench/apps/${APP_NAME} +cd "/home/frappe/frappe-bench/apps/${APP_NAME}" yarn echo "Build browser assets . . ." cd /home/frappe/frappe-bench/apps/frappe -yarn production --app ${APP_NAME} +yarn production --app "${APP_NAME}" echo "Install frappe NodeJS production dependencies . . ." cd /home/frappe/frappe-bench/apps/frappe yarn install --production=true echo "Install ${APP_NAME} NodeJS production dependencies . . ." -cd /home/frappe/frappe-bench/apps/${APP_NAME} +cd "/home/frappe/frappe-bench/apps/${APP_NAME}" yarn install --production=true -mkdir -p /home/frappe/frappe-bench/sites/assets/${APP_NAME} -cp -R /home/frappe/frappe-bench/apps/${APP_NAME}/${APP_NAME}/public/* /home/frappe/frappe-bench/sites/assets/${APP_NAME} +mkdir -p "/home/frappe/frappe-bench/sites/assets/${APP_NAME}" +cp -R "/home/frappe/frappe-bench/apps/${APP_NAME}/${APP_NAME}/public/*" "/home/frappe/frappe-bench/sites/assets/${APP_NAME}" # Add frappe and all the apps available under in frappe-bench here echo "rsync -a --delete /var/www/html/assets/frappe /assets" >/rsync