blob: 341fafda12c18a11659cc9c4159d9cad0c283a3f [file] [log] [blame]
Anand Doshi0a4d1e32012-05-26 15:17:38 +05301#!/usr/bin/python
2import commands
3
4cmd_list = [
5 'lib/wnf.py --pull origin master',
6 'lib/wnf.py -l',
7 'lib/wnf.py --sync_all'
8]
Anand Doshi652410b2012-05-26 15:28:28 +05309err = 0
Anand Doshi0a4d1e32012-05-26 15:17:38 +053010for cmd in cmd_list:
11 stat, op = commands.getstatusoutput(cmd)
12 if stat != 0:
13 print "something went wrong"
14 print "cannot proceed with update"
15 print "status: %s" % stat
16 print "output: %s" % op
Anand Doshi652410b2012-05-26 15:28:28 +053017 err = 1
Anand Doshi1c9913a2012-05-26 15:27:28 +053018 break
19
Anand Doshi652410b2012-05-26 15:28:28 +053020if not err:
21 print "update_erpnext.py --> run success."
22else:
23 print "update_erpnext.py --> run failed."