Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
0.0.2
Browse files Browse the repository at this point in the history
Added more information.
  • Loading branch information
Skarlett authored Jul 3, 2017
1 parent 1b56589 commit e77e381
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Sync/cronjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def main():
exit()

if not path.isfile(path.join(backupTo, 'dirs.lst')):
system('echo "# This file is a configuration of which directories you\'d like to backup." > %s' % path.join(backupTo, 'dirs.lst') )
system('echo "# This file is a configuration of which directories you\'d like to backup.\n'
'# This specific configuration is specific for (as for the moment of this install) \n'
'# %s " > %s' % (dev.data.source, path.join(backupTo, 'dirs.lst')))
system('nano %s' % path.join(backupTo, 'dirs.lst'))

with open(path.join(backupTo, 'dirs.lst')) as f:
Expand All @@ -71,11 +73,8 @@ def main():
else:
to = path.join(backupTo, directory.split('/')[::-1][0])

if not path.exists(to):
mkdir(to)

log('copying ' + directory.strip() + ' to ' + to)
assert system('rsync -azvh %s %s' % (directory.strip(), to )) == 0
assert system('rsync -azh %s %s' % (directory.strip(), to )) == 0
except Exception as e:
log('ERROR: '+e.message)
notify(e.message)
Expand Down

0 comments on commit e77e381

Please sign in to comment.