diff --git a/README.md b/README.md index b7cebf9..2bf92dd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This program allows you to download and convert any Wikipedia article's history ### Quick installation ``` -pip install https://github.com/dlenski/wp2git/archive/v1.0.zip +pip install https://github.com/dlenski/wp2git/archive/v1.0.1.zip ``` ### Usage diff --git a/wp2git/version.py b/wp2git/version.py index 9aca18b..611efb7 100644 --- a/wp2git/version.py +++ b/wp2git/version.py @@ -1,3 +1,3 @@ # Do not edit this file, wp2git versioning is governed by git tags -__version__="1.0" +__version__="1.0.1" diff --git a/wp2git/wp2git.py b/wp2git/wp2git.py index 15a895d..1c02be8 100755 --- a/wp2git/wp2git.py +++ b/wp2git/wp2git.py @@ -74,17 +74,16 @@ def main(): if args.doimport: # Create output directory and pipe to git if args.out is not None: - path = args.out + out = args.out else: - path = fn + out = fn - if os.path.exists(path): - p.error('path %s exists' % path) + if os.path.exists(out): + p.error('path %s exists' % out) else: - os.mkdir(path) - os.chdir(path) - sp.check_call(['git','init'] + (['--bare'] if args.bare else [])) - pipe = sp.Popen(['git', 'fast-import','--quiet','--done'], stdin=sp.PIPE) + os.mkdir(out) + sp.check_call(['git','init'] + (['--bare'] if args.bare else []), cwd=out) + pipe = sp.Popen(['git', 'fast-import','--quiet','--done'], stdin=sp.PIPE, cwd=out) fid = pipe.stdin else: fid = args.out @@ -125,7 +124,7 @@ def main(): if args.doimport: pipe.communicate() if not args.bare: - sp.check_call(['git','checkout']) + sp.check_call(['git','checkout'], cwd=out) if __name__=='__main__': main()