Add sync-drive script
Resolves #5 Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
cdf03d6c96
commit
d0a56b83cf
2 changed files with 22 additions and 1 deletions
|
@ -11,7 +11,7 @@
|
|||
# This file is loaded on boot by crontab.
|
||||
|
||||
# Synchronize Google Drive every 15 minutes
|
||||
*/15 * * * * grive -d -p $HOME/documents/ >> $HOME/.local/log/cron.log 2>&1
|
||||
*/15 * * * * $HOME/.local/bin/sync-drive >> $HOME/.local/log/cron.log 2>&1
|
||||
|
||||
# Sync pacman databases every 15 minutes
|
||||
*/15 * * * * sudo $HOME/.local/bin/sync-packages >> $HOME/.local/log/cron.log 2>&1
|
||||
|
|
21
system/.local/bin/sync-drive
Normal file
21
system/.local/bin/sync-drive
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# sync-drive
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin@kaderli.dev>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# Syncs Google Drive folder
|
||||
#
|
||||
# USAGE:
|
||||
# ./sync-drive
|
||||
. /home/severin/.local/bin/utils
|
||||
|
||||
if [ ! -d "/home/severin/documents" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
print_time_log "sync-drive" "Syncing with Google Drive"
|
||||
grive -d -p /home/severin/documents/
|
Loading…
Add table
Add a link
Reference in a new issue