More consistent directory name output in logs

pull/246/head
Jan Katins 2021-03-15 14:24:36 +01:00
parent 4dfc9a5461
commit 5510ca1b06
1 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@ unlock() { _lock u; } # drop a lock
sync_directory() {
_directory="${1}"
reset_timer_and_exit() { echo "Retriggered google drive sync" && touch -m $LOCKFILE && exit; }
reset_timer_and_exit() { echo "Retriggered google drive sync ('${_directory}')" && touch -m $LOCKFILE && exit; }
exlock_now || reset_timer_and_exit
@ -79,7 +79,7 @@ sync_directory() {
TIME_AT_START=0
TIME_AT_END=1
while [[ "${TIME_AT_START}" -lt "${TIME_AT_END}" ]]; do
echo "Syncing "${_directory}"..."
echo "Syncing '${_directory}'..."
TIME_AT_START="$(stat -c %Y "$LOCKFILE")"
# exclude symlinks from sync
cat "${_directory}"/.griveignore 2>/dev/null | sed '/#LINKS-EDIT_BEFORE_THIS$/,$d' > /tmp/.griveignore.base
@ -89,7 +89,7 @@ sync_directory() {
( cd "${_directory}" && find . -type l | sed 's/^.\///g'; ) >> "${_directory}"/.griveignore
grive -p "${_directory}" 2>&1 | grep -v -E "^Reading local directories$|^Reading remote server file list$|^Synchronizing files$|^Finished!$"
TIME_AT_END="$(stat -c %Y "$LOCKFILE")"
echo "Sync of "${_directory}" done."
echo "Sync of '${_directory}' done."
done
# always exit ok, so that we never go into a wrong systemd state
@ -105,7 +105,7 @@ listen_directory() {
type inotifywait >/dev/null 2>&1 || { echo >&2 "I require inotifywait but it's not installed. Aborting."; exit 1; }
echo "Listening for changes in ~/"${_directory}""
echo "Listening for changes in '${_directory}'"
while true #run indefinitely
do