all repos — dotfiles @ 003e2aabc008ffb6800f3f1198673ef0cebc54e2

linux dotfiles

update scripts

comments!
prithugoswami prithugoswami524@gmail.com
Mon, 04 Jun 2018 19:00:04 +0530
commit

003e2aabc008ffb6800f3f1198673ef0cebc54e2

parent

e5b78cd0020127df6c986046429feff99b4bf591

1 files changed, 8 insertions(+), 0 deletions(-)

jump to
M scripts/pdscripts/pd

@@ -80,6 +80,10 @@ os.remove(tmp_pd_path)

def fetch_and_decrypt(): + """ + Fetches the cloud copy first (sync) and then decrypts + it to tmp_pd_path + """ print("Fetching changes...") if not os.system('rclone sync {}/ {}/'.format(rclone_dir, pd_dir)): print("Done")

@@ -97,6 +101,10 @@ print("Something went wrong")

def encrypt_and_push(): + """ + Encrypts the file at tmp_pd_path and then syncs to the cloud. + i.e replace the copy in the cloud with the local one. + """ if os.path.exists(pd_path): os.remove(pd_path) encrypt_cmd = ('gpg --passphrase-file {} --batch -o {} -c {}'