#!/usr/bin/env bash
# 
# SCRIPT NAME:
# sync-tasks
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Sync tasks in ~/Tasks using git
#
# USAGE:
# ./sync-tasks
. /home/severin/.local/bin/utils

export TASKDATA="/home/severin/Tasks"
export TASKRC="/home/severin/.config/task/taskrc"

print_time_log "sync-tasks" "Synchronizing tasks"

task sync 

cd "/home/severin/Tasks" || exit
git pull > /dev/null 2>&1
git add --all > /dev/null 2>&1
git commit -s -m "Update tasks" > /dev/null 2>&1
git push origin master > /dev/null 2>&1
