diff --git a/pull_code.py b/pull_code.py new file mode 100755 index 0000000..d3f150b --- /dev/null +++ b/pull_code.py @@ -0,0 +1,11 @@ +import os, sys +from datetime import datetime +from sys import version_info + +py3 = version_info[0] + +res = raw_input("Please enter your name: ") +if(res == 'y'): + print res +else: + print "wrong" diff --git a/push_code.py b/push_code.py new file mode 100755 index 0000000..058ccb9 --- /dev/null +++ b/push_code.py @@ -0,0 +1,19 @@ +import os, sys +from datetime import datetime + +time = datetime.now().strftime("%B %d %H:%M hours") +status = "git status" +add = 'git add .' +commit = "git commit -a -m " + "\"" + time + "\"" +push = "git push -u origin master" +os.system(status) +proceed = raw_input('Proceed?') +if (proceed == 'y'): + os.system(commit) + os.system(push) +elif (proceed == 'a'): + os.system(add) + os.system(commit) + os.system(push) +else: + print "Aborting push.."