erplibre/script/docker/docker_repo_show_status.sh

26 lines
536 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
CURRENT=$(pwd)
BASENAME=$(basename "${CURRENT}")
# Docker remove dot
BASENAME="${BASENAME//./}"
# Lowercase
BASENAME="${BASENAME,,}"
docker exec -u root -ti ${BASENAME}-ERPLibre-1 /bin/bash -c "\
cd /ERPLibre; \
.venv.erplibre/bin/repo forall -pc 'git status -s'; \
2021-07-01 03:19:29 -04:00
echo ''; \
git status -s; \
"
retVal=$?
if [[ $retVal -ne 0 ]]; then
docker exec -u root -ti ${BASENAME}_ERPLibre_1 /bin/bash -c "\
cd /ERPLibre; \
.venv.erplibre/bin/repo forall -pc 'git status -s'; \
echo ''; \
git status -s; \
"
fi