diff --git a/rc_shared.sh b/rc_shared.sh index 538d960..734f202 100644 --- a/rc_shared.sh +++ b/rc_shared.sh @@ -590,32 +590,34 @@ eval "$(declare -F | grep -v _ | sed 's/-f /-fx /')" # Run update checker in background. ( - if [[ -d "$PROJECT_SHARED" ]]; then - git -C "$PROJECT_SHARED" fetch >/dev/null 2>&1 \ - && git -C "$PROJECT_SHARED" status \ - | grep "is behind" \ - | while read status; do - title=TBD - message=TBD - success=0 - reload-shared || success=1 - if [[ $success == 0 ]]; then - title="env-shared Updated" - message="Updated with 'reload-shared'." - else - title="env-shared Updates Available" - message="Update with 'reload-shared'." - fi - if [[ -d /sdcard ]]; then - termux-notification \ - -t "$title" \ - -c "$message" - else - notify-send "$title" "$message" - fi - done - fi -) >> "$HOME"/Reports/env-shared.log 2>&1 & + ( + if [[ -d "$PROJECT_SHARED" ]]; then + git -C "$PROJECT_SHARED" fetch >/dev/null 2>&1 \ + && git -C "$PROJECT_SHARED" status \ + | grep "is behind" \ + | while read status; do + title=TBD + message=TBD + success=0 + reload-shared || success=1 + if [[ $success == 0 ]]; then + title="env-shared Updated" + message="Updated with 'reload-shared'." + else + title="env-shared Updates Available" + message="Update with 'reload-shared'." + fi + if [[ -d /sdcard ]]; then + termux-notification \ + -t "$title" \ + -c "$message" + else + notify-send "$title" "$message" + fi + done + fi + ) >> "$HOME"/Reports/env-shared.log 2>&1 & +) ## Complete! ##