From 57c519806337ba584be59fdce8d54f400aace425 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Sat, 12 Dec 2020 22:41:15 -0500 Subject: [PATCH 1/2] Add error message for lack of git/hg or curl --- SHA1SUM | 2 +- SHA256SUM | 2 +- SHA512SUM | 2 +- codecov | 18 ++++++++++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/SHA1SUM b/SHA1SUM index ea452717..4fbc564c 100644 --- a/SHA1SUM +++ b/SHA1SUM @@ -1 +1 @@ -bcb092c12b8fc525e28084d2116e1c0bdf528a76 codecov +24b08d679caba5a653bd54051117af5b36cd41dc codecov diff --git a/SHA256SUM b/SHA256SUM index 00105505..eea007d9 100644 --- a/SHA256SUM +++ b/SHA256SUM @@ -1 +1 @@ -384737e2617b8e570cab390b5d619d6aaff613795dbc096bfa9b2d5964723556 codecov +b47461d35b11d6a1354632319e43f769a36b3f4b1effd82237baecece99f9c20 codecov diff --git a/SHA512SUM b/SHA512SUM index c3e2be98..c2ce8bc9 100644 --- a/SHA512SUM +++ b/SHA512SUM @@ -1 +1 @@ -d20ff9622e5e820e035d17972768afae1f346e6e33ddb6fbaa48ed4ed9a79a7b674e82335f8472a81edc9faa2a1e19d3f7f1b5ec06b007d20e46854e847598ae codecov +cf3429ba37e717dc3d52c952ceea85c0b50f582faf4092c670a076d9a0afb0c90cf8faef2dce5f3ae63686e88331b1042b55d6b0c5b2fc0f095e472138109d5f codecov diff --git a/codecov b/codecov index 6e75a747..456e3c44 100755 --- a/codecov +++ b/codecov @@ -83,6 +83,7 @@ b="\033[0;36m" g="\033[0;32m" r="\033[0;31m" e="\033[0;90m" +y="\033[0;33m" x="\033[0m" show_help() { @@ -470,6 +471,23 @@ say " " +# check for installed tools +# git/hg +if ! [ -x "$(command -v git)" ]; +then + say "$y==>$x git not installed, testing for mercurial" + if ! [ -x "$(command -v hg)" ]; + then + say "$r==>$x git nor mercurial are installed. Uploader may fail or have unintended consequences" + fi +fi +# curl +if ! [ -x "$(command -v curl)" ]; +then + say "$r==>$x curl not installed. Exiting." + exit ${exit_with}; +fi + search_in="$proj_root" #shellcheck disable=SC2154 From 8c999b33ebef512f1a95d86527ffa8b5c185d4d4 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Mon, 14 Dec 2020 23:17:56 -0500 Subject: [PATCH 2/2] Add versions --- SHA1SUM | 2 +- SHA256SUM | 2 +- SHA512SUM | 2 +- codecov | 12 +++++++++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/SHA1SUM b/SHA1SUM index e15fd599..d794356d 100644 --- a/SHA1SUM +++ b/SHA1SUM @@ -1 +1 @@ -dccccb53a6f1f6b13c633a6fc237402380ae9bf0 codecov +a0a6a995c0344a91f842d706be0ce382198f9c3e codecov diff --git a/SHA256SUM b/SHA256SUM index 2145bc00..938f7830 100644 --- a/SHA256SUM +++ b/SHA256SUM @@ -1 +1 @@ -9a94fb8cf6bb031d0428f18c79e929cab5d9ea41cc6e40eb546115cfb78bd416 codecov +6b3a7a4dc3ba8bdaa12b1341cddc310b780d5e9eb1ef51d240c8ada352a763fa codecov diff --git a/SHA512SUM b/SHA512SUM index 9eba9df2..69ffac97 100644 --- a/SHA512SUM +++ b/SHA512SUM @@ -1 +1 @@ -b4c8394904a3f97dc18b6a6522744d40241c6ee7e933b7e3f36980eaf37bab1ea9d40f7f2012e9f20cae3875f60d42d56576b45e8e35faf0f71055cc102cba23 codecov +08c2e1854c0c45fcfcfb8923c5b2799d8cf252f0b75e590dbac1a70506a93688ee1b4dc4c96846575224c58b1e362d0ebb1bcebf163c38cb93bd65484ae9b3bc codecov diff --git a/codecov b/codecov index 9eae8229..4e25fd61 100755 --- a/codecov +++ b/codecov @@ -472,17 +472,23 @@ say " # check for installed tools # git/hg -if ! [ -x "$(command -v git)" ]; +if [ -x "$(command -v git)" ]; then + say " $(git --version) found" +else say "$y==>$x git not installed, testing for mercurial" - if ! [ -x "$(command -v hg)" ]; + if [ -x "$(command -v hg)" ]; then + say " $(hg --version) found" + else say "$r==>$x git nor mercurial are installed. Uploader may fail or have unintended consequences" fi fi # curl -if ! [ -x "$(command -v curl)" ]; +if [ -x "$(command -v curl)" ]; then + say " $(curl --version) found" +else say "$r==>$x curl not installed. Exiting." exit ${exit_with}; fi