diff options
author | Jesús <heckyel@hyperbola.info> | 2021-08-22 21:44:20 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-08-22 21:44:20 -0500 |
commit | 47837163c24f5b88b2194fa92ef86e767b409258 (patch) | |
tree | 3783515f0cd90742798c49ae70664e4475273897 /hyperterm | |
parent | 1355a7784ee79522ec9a49d7171e0257a2e813cf (diff) | |
download | hyperterm-47837163c24f5b88b2194fa92ef86e767b409258.tar.lz hyperterm-47837163c24f5b88b2194fa92ef86e767b409258.tar.xz hyperterm-47837163c24f5b88b2194fa92ef86e767b409258.zip |
fix if a bash variable is null
Diffstat (limited to 'hyperterm')
-rw-r--r-- | hyperterm/core/git.sh | 4 | ||||
-rw-r--r-- | hyperterm/hyperterm.sha512 | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/hyperterm/core/git.sh b/hyperterm/core/git.sh index 6cf9854..881df2e 100644 --- a/hyperterm/core/git.sh +++ b/hyperterm/core/git.sh @@ -150,7 +150,7 @@ ___upstream="$(git rev-parse --symbolic-full-name --abbrev-ref "@{upstream}" 2> function _git_behind_count() { local __behind_count - if [[ -s $___upstream ]]; then + if [[ ! -z $___upstream ]]; then __behind_count="$(git rev-list --left-right --count "$___upstream"...HEAD | cut -f1 2> /dev/null)" case $__behind_count in 0) echo -n '';; @@ -161,7 +161,7 @@ function _git_behind_count() { function _git_ahead_count() { local __ahead_count - if [[ -s $___upstream ]]; then + if [[ ! -z $___upstream ]]; then __ahead_count="$(git rev-list --left-right --count "$___upstream"...HEAD | cut -f2 2> /dev/null)" case $__ahead_count in 0) echo -n '';; diff --git a/hyperterm/hyperterm.sha512 b/hyperterm/hyperterm.sha512 index 7ea4459..e06b1eb 100644 --- a/hyperterm/hyperterm.sha512 +++ b/hyperterm/hyperterm.sha512 @@ -13,7 +13,7 @@ fab9d339a99c7d2e1809d1c44f533523c6bfcdcc8d63c62b335ce7d4c666c8bdd7ac319316bf71f0 6f3aaa2ab53b33e3505d46d78040bab66c583986583d67e0712fdad06d78ad0608cc2606f639d128e8013177ea9cf07b7cf4c65758a750529d724bc3bdeb5be0 ./tools/network.sh 7447d3e167ab207d3ef4218e201a06bf5a3fc23281639f16f7f405f1d66b73923845d450fdb0a94672757866a9da0324f728564a1b61b2ed1678fe576eb565cf ./core/autocomplete.sh 065cfa39f1b4312ed275ad1039827a24f703176c653a8d27303d145f9d389a60ec5b3a9eb167e060cc6fd093b9c03cfb1a8b70254d444fbc6e62e2297d88b310 ./core/status.sh -e7c13363405709475060cd999b665762dc9e3755cf7f154bf8583cd807eb2bd063e5215d2fd5e67cbf92c00b5cb1dae68724bacb93e96fca04f8cdffdd9485e8 ./core/git.sh +f253b2ceed9deba68d9832b625f7d2b65494811ee13bf42be0babf8656bd8a874229ccb80f94f2562c4c92e4a8edb7ab0772ddcbe2bcd2218d68bd56b93533cc ./core/git.sh 915196c638ac432a0eccb4cd127af14398385cb7094b3f6142adc21e4c4f155214ead74511f21b6acf20d2edad8934e893a8900ceafc59df8e66bc789095d58c ./core/update.sh f3e00b2aa8ab9f3ab44570adaa2520408ed66fd00f551654d60b64a4be3546ec781b7efa39bcd774937e654b6ffb4c7af3f21eeb36caf9c01f82f85cf28e2b4d ./core/languages.sh 1cfba599047d84a17ff92b695ebf527a505a30acc9ec21a2b9f410a7ea6dde4b23b5cf62e557d82f2fe9a8980649942424b879ca53baae4d4cb3057681baa7b6 ./core/colors.sh |