From ff5c7a2af90663697a90722db48e0a3225049126 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Thu, 22 Jul 2021 00:25:44 -0400 Subject: Refactor fetch.sh Some code is restructured to remove the need for this additional entry-point. Signed-off-by: Malfurious --- fetch.sh | 13 ------------- git-sonar | 2 +- sonar-base.sh | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100755 fetch.sh 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; diff --git a/git-sonar b/git-sonar index ecbf8b8..95d0626 100755 --- a/git-sonar +++ b/git-sonar @@ -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 } -- cgit v1.2.3