update scripts/pd removed the stupid stopping mecahnism
prithugoswami prithugoswami524@gmail.com
Sat, 28 Apr 2018 13:44:22 +0530
1 files changed,
0 insertions(+),
29 deletions(-)
jump to
M
scripts/pd
→
scripts/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'])