-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2.py
More file actions
15 lines (12 loc) · 667 Bytes
/
2.py
File metadata and controls
15 lines (12 loc) · 667 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import sys
import subprocess
user_name = sys.argv[1]
github_repo_name = sys.argv[2]
gitbook_repo_name = sys.argv[3]
github_repo_url = "https://github.com/{name}/{repo}.git".format(name=user_name, repo=github_repo_name)
gitbook_repo_url = "https://git.gitbook.com/{name}/{repo}.git".format(name=user_name, repo=gitbook_repo_name)
subprocess.call("git remote set-url --add --push origin "+github_repo_url, shell=True)
print "> Add pushurl {} to remote origin".format(github_repo_url)
subprocess.call("git remote set-url --add --push origin "+gitbook_repo_url, shell=True)
print "> Add pushurl {} to remote origin".format(gitbook_repo_url)
print "> Mission Complete"