task: Add hooks directory
This commit is contained in:
parent
18af397ed5
commit
61ca8110a0
2 changed files with 14 additions and 0 deletions
12
task/hooks/on-exit-sync.sh
Executable file
12
task/hooks/on-exit-sync.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
count=0
|
||||
while read -r; do
|
||||
count=$((count + 1))
|
||||
done
|
||||
|
||||
if ((count > 0)); then
|
||||
exec task sync | tee ~/.task/sync_hook.log
|
||||
else
|
||||
echo "No changes to sync"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue