Skip to content

Commit

Permalink
Update sync.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Redrield authored Oct 1, 2017
1 parent 7246ffa commit 7d7738c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from os.path import basename
import pyinotify

dirname = "/home/redrield/Documents/Classroom"
dirname = "/home/redrield/Documents/Classroom" # Change directory to what you want here
rcloneDriveName = "School Drive" # Change rclone drive to the one you've defined and you want to sync

watchManager = pyinotify.WatchManager()

Expand All @@ -14,7 +15,7 @@


def handler(ev):
os.system("""rclone sync {} "School Drive:/{}" """.format(dirname, basename(dirname)))
os.system("""rclone sync {} "{}:/{}" """.format(dirname, rcloneDriveName, basename(dirname)))


notifier = pyinotify.Notifier(watchManager, handler)
Expand Down

0 comments on commit 7d7738c

Please sign in to comment.