refactor: bash scripts [stip travis]

- shellchecke and shfmt checked and formatted
- indentation 2 spaces
- redirect errors to stderr
- short if where possible
- add function string to clarify visuaally identify its a funtion
- make [ ... ] to [[ ... ]]
- use == for comparision
- use cat based notes
- remove unecessary spaces
- double quotes where needed
This commit is contained in:
pratikbalar
2021-06-23 09:13:24 +05:30
parent e6a5209001
commit 12eb5c92e4
7 changed files with 566 additions and 596 deletions

View File

@@ -6,11 +6,11 @@ APP_BRANCH=${3}
cd /home/frappe/frappe-bench/
. env/bin/activate
env/bin/activate
cd ./apps
[ "${APP_BRANCH}" ] && BRANCH="-b ${APP_BRANCH}"
[[ -n "${APP_BRANCH}" ]] && BRANCH="-b ${APP_BRANCH}"
git clone --depth 1 -o upstream ${APP_REPO} ${BRANCH} ${APP_NAME}
pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/${APP_NAME}
pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/${APP_NAME}