1
0
Fork 0
mirror of https://github.com/clockfort/GitHub-Backup.git synced 2025-03-09 00:00:03 +01:00

update_repo must use os.chdir(). calling os.system(cd

This commit is contained in:
Doug Turner 2013-08-18 22:29:41 -07:00
parent 11c003c6af
commit c8cb9b4bdf

View file

@ -71,7 +71,8 @@ def clone_repo(repo, dir, args):
def update_repo(repo, dir, args):
os.system("cd %s"%(dir,))
savedPath = os.getcwd()
os.chdir(dir)
# GitHub => Local
if args.mirror:
@ -80,6 +81,7 @@ def update_repo(repo, dir, args):
else:
os.system("git pull %s"%(args.git,))
os.chdir(savedPath)
if __name__ == "__main__":
main()