This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This hooks script syncs task warrior to the configured task server. | |
# The on-exit event is triggered once, after all processing is complete. | |
# Make sure this task folder exists | |
LOCK_FILE=$XDG_CACHE_HOME/task/autosync.lock | |
TASK_DATA_FOLDER=$(task rc.hooks=0 _get rc.data.location) # rc.hooks=0 disables hooks, preventing a loop | |
if [ ! -f $LOCK_FILE ]; then | |
touch $LOCK_FILE |