all repos — dotfiles @ 77893244723109c4f2e620b648a660d19409ec7d

linux dotfiles

update scripts/pd

removed the stupid stopping mecahnism
prithugoswami prithugoswami524@gmail.com
Sat, 28 Apr 2018 13:44:22 +0530
commit

77893244723109c4f2e620b648a660d19409ec7d

parent

89a600082c06d250f5f1c68da2bbe51a366afa8e

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

jump to
M scripts/pdscripts/pd

@@ -12,29 +12,6 @@

file_path = r'/home/prithu/Dropbox/Tasker/pd.txt' -# This script keeps checking for the dropbox status every 10s and -# runs 'dropbox stop' and exits once dropbox is done with its -# syncing. this shell script should be in the PATH. -exitdrop=( -""" -#!/bin/bash -stat=$(dropbox status) -if [ "$stat" = "Dropbox isn't running!" ] -then - echo $stat - exit 0 -fi -while : -do - if [ "$stat" = "Up to date" ] - then - dropbox stop - exit 0 - fi - stat=$(dropbox status) -done -""") - entry = None with tempfile.NamedTemporaryFile(suffix='.pdtemp') as temp:

@@ -55,9 +32,3 @@ fp.write('\n\n\n===============================\n' + date_and_time + '\n')

fp.write(entry) subprocess.run(['dropbox', 'start']) - -with open('/tmp/exitdrop.sh', 'w') as tmp: - tmp.write(exitdrop) - tmp.close() - subprocess.run(['chmod', '+x', '/tmp/exitdrop.sh']) - subprocess.run(['sh', '/tmp/exitdrop.sh'])