dotfiles/system/.local/bin/sync-tasks
Severin Kaderli 0c06679e5f
Update sync scripts
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
2019-06-25 10:59:18 +02:00

33 lines
634 B
Bash
Executable file

#!/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
if [ ! -d "/home/severin/tasks" ]; then
exit
fi
print_time_log "sync-tasks" "Synchronizing tasks"
export TASKDATA="/home/severin/tasks"
export TASKRC="/home/severin/.config/task/taskrc"
if [ "${IS_WORK}" = "1" ]; then
export GIT_SSH_COMMAND="ssh -i /home/severin/.ssh/severin_id_rsa"
fi
cd "/home/severin/tasks" || exit
git pull -X theirs
git add --all
git commit -s -m "Update tasks"
git push origin master