pub / stagit-scripts

Building src.jayvii.de with stagit
git clone https://src.jayvii.de/pub/stagit-scripts.git
Home | Log | Files | Exports | Refs | README | RSS

commit 6503f25b8b1c482809edd251cbf2a1dbe1b5fcfe
parent a5bf9b3e233df3f782b43364462930d4d3c704e9
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Mon, 17 Jun 2024 19:52:00 +0200

fix: close if-clause

Diffstat:
Mbin/git_deploy.sh | 46++++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 22 deletions(-)

diff --git a/bin/git_deploy.sh b/bin/git_deploy.sh @@ -38,39 +38,41 @@ for REF in $@; do # fetch the archive from previous export via git_export_tarball.sh if [ -f "${1}/${2}${3}/exports/${TAG}.tar.gz" ]; then - # extract archive to temporary directory - TMPDIR=`mktemp --directory` - tar xfvz "${1}/${2}${3}/exports/${TAG}.tar.gz" \ - --directory "${TMPDIR}/" > /dev/null + # extract archive to temporary directory + TMPDIR=`mktemp --directory` + tar xfvz "${1}/${2}${3}/exports/${TAG}.tar.gz" \ + --directory "${TMPDIR}/" > /dev/null - MAKE_STATUS=0 + MAKE_STATUS=0 - # check whether Makefile exists - if [ -f "${TMPDIR}/Makefile" ]; then + # check whether Makefile exists + if [ -f "${TMPDIR}/Makefile" ]; then - # check whether Makefile contains the git-hook-deploy rule - if [ ! -z $(grep "git-hook-deploy" "${TMPDIR}/Makefile") ]; then + # check whether Makefile contains the git-hook-deploy rule + if [ ! -z $(grep "git-hook-deploy" "${TMPDIR}/Makefile") ]; then - # run deployment - cd "$TMPDIR" - make git-hook-deploy > /dev/null - MAKE_STATUS=$? + # run deployment + cd "$TMPDIR" + make git-hook-deploy > /dev/null + MAKE_STATUS=$? + + # User output + if [ $MAKE_STATUS -gt 0 ]; then + echo "Version ${TAG} has been deployed" + fi - # User output - if [ $MAKE_STATUS -gt 0 ]; then - echo "Version ${TAG} has been deployed" fi fi - fi + # clean up + rm -r "$TMPDIR" - # clean up - rm -r "$TMPDIR" + # error handling + if [ $MAKE_STATUS -gt 0 ]; then + exit 1 + fi - # error handling - if [ $MAKE_STATUS -gt 0 ]; then - exit 1 fi fi