generated from me/template-mit
Double wrap the updater commands so that the DONE code does not appear in the terminl.
This commit is contained in:
54
rc_shared.sh
54
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! ##
|
||||
|
||||
Reference in New Issue
Block a user