Files
taskwarrior-2.x/scripts/hooks/on-exit.shadow-file
Paul Beckingham 7fdac6a09e Hooks
- Added an example hook script, on-exit.shadow-file, which simulates the now
  deprecated (soon to be removed) shadow file feature.
2014-09-08 00:51:21 -04:00

22 lines
645 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# This hook script replaces the shadow file feature, found in Taskwarrior
# prior to version 2.4.0.
#
# This script assumes that the legacy shadow file settings are still used.
# Although those settings are now not recognized by Taskwarrior, іt is
# harmless to store configuration settings for extensions in .taskrc.
# The command to run, to generate the shadow file.
SHADOW_COMMAND=$(task _get rc.shadow.command)
# The file to overwrite.
SHADOW_FILE=$(task _get rc.shadow.file)
# Overwrite the shadow file by running the command.
task $SHADOW_COMMAND > $SHADOW_FILE 2>/dev/null
echo Shadow file $SHADOW_FILE updated.
exit 0