From: Samir Benmendil Date: Thu, 1 Mar 2018 19:13:00 +0000 (+0000) Subject: mbsync: only execute .hook files X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/8807c4c70b5b4d8846fc0d0bf931849fbd08118e mbsync: only execute .hook files --- diff --git a/isync/post-sync.d/10-youtube b/isync/post-sync.d/10-youtube.hook similarity index 100% rename from isync/post-sync.d/10-youtube rename to isync/post-sync.d/10-youtube.hook diff --git a/isync/sync-mail b/isync/sync-mail index ef2ef45..e9cf8d9 100755 --- a/isync/sync-mail +++ b/isync/sync-mail @@ -5,14 +5,14 @@ mbsync_args="$*" export dir="$(dirname "${BASH_SOURCE[0]}")" export config=$dir/config -for hook in $(find $dir/pre-sync.d -type f -executable); do +for hook in $(find $dir/pre-sync.d -type f -name '*.hook' -executable); do "$hook" $mbsync_args done mbsync -c "$config" $mbsync_args export mbsync_errno=$? -for hook in $(find $dir/post-sync.d -type f -executable); do +for hook in $(find $dir/post-sync.d -type f -name '*.hook' -executable); do "$hook" $mbsync_args done