generated from me/template-mit
Try to do the output redirect a different way, fork at the very very end,.
This commit is contained in:
54
rc_shared.sh
54
rc_shared.sh
@@ -589,32 +589,34 @@ alias clean-trashed='find "$TRASH_ROOT" -name ".trashed*" -exec du -h {} \; -del
|
||||
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
|
||||
#log "\n\n`date` - env-shared has been improved."
|
||||
#log " '$status'"
|
||||
#log "\n\n`date` - Run 'update-shared' to update."
|
||||
title=TBD
|
||||
message=TBD
|
||||
reload-shared && {
|
||||
title="env-shared Updated"
|
||||
message="Updated with 'reload-shared'."
|
||||
} || {
|
||||
title="env-shared Updates Available"
|
||||
message="Update with 'reload-shared'."
|
||||
}
|
||||
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
|
||||
#log "\n\n`date` - env-shared has been improved."
|
||||
#log " '$status'"
|
||||
#log "\n\n`date` - Run 'update-shared' to update."
|
||||
title=TBD
|
||||
message=TBD
|
||||
reload-shared && {
|
||||
title="env-shared Updated"
|
||||
message="Updated with 'reload-shared'."
|
||||
} || {
|
||||
title="env-shared Updates Available"
|
||||
message="Update with 'reload-shared'."
|
||||
}
|
||||
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