diff options
author | Malfurious <m@lfurio.us> | 2021-07-22 00:25:44 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2021-07-22 00:25:44 -0400 |
commit | ff5c7a2af90663697a90722db48e0a3225049126 (patch) | |
tree | 5a3456c90cce46f6c3ff7ad54221f75ef0b8deef | |
parent | c4da5e91d0533b647b9a043e02490f1886c1da0f (diff) | |
download | git-sonar-ff5c7a2af90663697a90722db48e0a3225049126.tar.gz git-sonar-ff5c7a2af90663697a90722db48e0a3225049126.zip |
Refactor fetch.sh
Some code is restructured to remove the need for this additional
entry-point.
Signed-off-by: Malfurious <m@lfurio.us>
-rwxr-xr-x | fetch.sh | 13 | ||||
-rwxr-xr-x | git-sonar | 2 | ||||
-rwxr-xr-x | sonar-base.sh | 2 |
3 files changed, 2 insertions, 15 deletions
diff --git a/fetch.sh b/fetch.sh deleted file mode 100755 index eed6960..0000000 --- a/fetch.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -if [[ "$OSTYPE" == *darwin* ]]; then - READLINK_CMD='greadlink' -else - READLINK_CMD='readlink' -fi - -dot="$(cd "$(dirname "$([ -L "$0" ] && $READLINK_CMD -f "$0" || echo "$0")")" || exit; pwd)" - -source "$dot/sonar-base.sh" - -fetch; @@ -93,7 +93,7 @@ while [[ $# -gt 0 ]];do shift if [[ "$command" == "--fetch" ]]; then - nohup "$dot/fetch.sh" >/dev/null 2>&1 & + fetch >/dev/null 2>&1 fi done diff --git a/sonar-base.sh b/sonar-base.sh index ed48726..d9c3312 100755 --- a/sonar-base.sh +++ b/sonar-base.sh @@ -168,7 +168,7 @@ fetch() { if time_to_update "$FETCH_TIME"; then record_timestamp - git fetch --quiet > /dev/null 2>&1 + nohup git fetch --quiet >/dev/null 2>&1 & fi } |