Remove notes and tasks scripts
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
12b0f14748
commit
f602972a52
4 changed files with 1 additions and 97 deletions
27
install
27
install
|
@ -245,33 +245,6 @@ do
|
|||
mkdir -p "${HOME}/${dir}"
|
||||
done
|
||||
|
||||
print_section "Setup notes directory"
|
||||
if [ ! -d "${HOME}/notes" ]; then
|
||||
git clone gl:notes "${HOME}/notes"
|
||||
print_log "Created notes directory"
|
||||
else
|
||||
print_log "Notes directory already exists"
|
||||
fi
|
||||
|
||||
print_section "Setup tasks directory"
|
||||
if [ ! -d "${HOME}/tasks" ]; then
|
||||
git clone gl:tasks "${HOME}/tasks"
|
||||
print_log "Created tasks directory"
|
||||
else
|
||||
OLD_DIR=$(pwd)
|
||||
cd "${HOME}/tasks" || exit
|
||||
|
||||
if git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
print_log "Tasks directory already exists"
|
||||
else
|
||||
cd "${OLD_DIR}"
|
||||
rm -rf "${HOME:?}/tasks"
|
||||
git clone gl:tasks "${HOME}/tasks"
|
||||
print_log "Created tasks directory"
|
||||
fi
|
||||
|
||||
cd "${OLD_DIR}" || exit
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
# Prepare work tools #
|
||||
|
|
|
@ -12,9 +12,3 @@
|
|||
|
||||
# Synchronize Google Drive every 15 minutes
|
||||
*/15 * * * * $HOME/.local/bin/sync-drive 2>> $HOME/.local/log/cron.log
|
||||
|
||||
# Synchronize notes every 10 minutes
|
||||
*/10 * * * * $HOME/.local/bin/sync-notes 2>> $HOME/.local/log/cron.log
|
||||
|
||||
# Synchronize tasks every 5 minutes
|
||||
*/5 * * * * $HOME/.local/bin/sync-tasks 2>> $HOME/.local/log/cron.log
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# sync-notes
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin@kaderli.dev>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# Sync notes in ~/Notes using git
|
||||
#
|
||||
# USAGE:
|
||||
# ./sync-notes
|
||||
. /home/severin/.local/bin/utils
|
||||
|
||||
if [ ! -d "/home/severin/notes" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
print_time_log "sync-notes" "Synchronizing notes"
|
||||
|
||||
if [ "${IS_WORK}" = "1" ]; then
|
||||
export GIT_SSH_COMMAND="ssh -i /home/severin/.ssh/severin_id_rsa"
|
||||
fi
|
||||
|
||||
cd "/home/severin/notes" || exit
|
||||
git pull -X theirs
|
||||
git add --all
|
||||
git commit -s -m "Update notes"
|
||||
git push origin master
|
|
@ -1,33 +0,0 @@
|
|||
#!/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
|
Loading…
Add table
Add a link
Reference in a new issue