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