diff options
author | Andreas Schneider <asn@samba.org> | 2022-02-23 12:11:07 +0100 |
---|---|---|
committer | Pavel Filipensky <pfilipensky@samba.org> | 2022-08-10 14:14:04 +0000 |
commit | 042141efdb56d1e8d9f0246c9dff3a6c4329b8d4 (patch) | |
tree | 8e0049d0d132928c9356ef60a0119521de105476 /third_party/waf | |
parent | bb2e0622f04355bc3c8ac7dc8d0d6dcf7a66b107 (diff) | |
download | samba-042141efdb56d1e8d9f0246c9dff3a6c4329b8d4.tar.gz |
third_party: Reformat shell scripts
shfmt -w -p -i 0 -fn third_party/update.sh
shfmt -w -p -i 0 -fn third_party/waf/update.sh
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Wed Aug 10 14:14:04 UTC 2022 on sn-devel-184
Diffstat (limited to 'third_party/waf')
-rwxr-xr-x | third_party/waf/update.sh | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/third_party/waf/update.sh b/third_party/waf/update.sh index 1983ab0ca6e..45fbeec5eff 100755 --- a/third_party/waf/update.sh +++ b/third_party/waf/update.sh @@ -1,8 +1,8 @@ #!/bin/bash if [[ $# -lt 1 ]]; then - echo "Usage: update.sh VERSION" - exit 1 + echo "Usage: update.sh VERSION" + exit 1 fi WAF_VERSION="${1}" @@ -16,19 +16,21 @@ echo "GIT URL: ${WAF_GIT}" echo "WAF SAMBA DIR: ${WAF_SAMBA_DIR}" echo "WAF TMP DIR: ${WAF_TMPDIR}" -cleanup_tmpdir() { - popd 2>/dev/null || true - rm -rf "$WAF_TMPDIR" +cleanup_tmpdir() +{ + popd 2>/dev/null || true + rm -rf "$WAF_TMPDIR" } trap cleanup_tmpdir SIGINT -cleanup_and_exit() { - cleanup_tmpdir - if test "$1" = 0 -o -z "$1" ; then - exit 0 - else - exit "$1" - fi +cleanup_and_exit() +{ + cleanup_tmpdir + if test "$1" = 0 -o -z "$1"; then + exit 0 + else + exit "$1" + fi } # Checkout the git tree @@ -38,17 +40,16 @@ pushd "${WAF_TMPDIR}" || cleanup_and_exit 1 git clone "${WAF_GIT}" ret=$? if [ $ret -ne 0 ]; then - echo "ERROR: Failed to clone repository" - cleanup_and_exit 1 + echo "ERROR: Failed to clone repository" + cleanup_and_exit 1 fi - pushd waf || cleanup_and_exit 1 git checkout -b "waf-${WAF_VERSION}" "waf-${WAF_VERSION}" ret=$? if [ $ret -ne 0 ]; then - echo "ERROR: Failed to checkout waf-${WAF_VERSION} repository" - cleanup_and_exit 1 + echo "ERROR: Failed to checkout waf-${WAF_VERSION} repository" + cleanup_and_exit 1 fi popd || cleanup_and_exit 1 @@ -62,8 +63,8 @@ rm -rf waflib/ rsync -av "${WAF_TMPDIR}/waf/waflib" . ret=$? if [ $ret -ne 0 ]; then - echo "ERROR: Failed copy waflib" - cleanup_and_exit 1 + echo "ERROR: Failed copy waflib" + cleanup_and_exit 1 fi chmod -x waflib/Context.py |