-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsyncforks.py
More file actions
executable file
·45 lines (34 loc) · 1.18 KB
/
Copy pathsyncforks.py
File metadata and controls
executable file
·45 lines (34 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/python3
# Syncs all git forks inside the Development directory
import os
import subprocess
# Original
linux = "/home/cgar/Development/linux/"
openbsd = "/home/cgar/Development/OpenBSD/"
original = (linux, openbsd)
# Master branch
rust = "/home/cgar/Development/rust/"
python = "/home/cgar/Development/cpython/"
bedrock = "/home/cgar/Development/mozilla_org_bedrock/"
devguide = "/home/cgar/Development/python_devguide/"
django = "/home/cgar/Development/django/"
servo = "/home/cgar/Development/servo/"
flask = "/home/cgar/Development/flask/"
masterForks = (rust, python, bedrock, devguide, django, servo, flask)
# Devel branch
ansible = "/home/cgar/Development/ansible/"
develForks = (ansible)
# Start sync
for forks in original:
os.chdir(forks)
subprocess.call("git pull", shell=True)
for forks in masterForks:
os.chdir(forks)
subprocess.call("git fetch upstream", shell=True)
subprocess.call("git merge upstream/master", shell=True)
subprocess.call("git push", shell=True)
# for forks in develForks:
os.chdir(ansible)
subprocess.call("git fetch upstream", shell=True)
subprocess.call("git merge upstream/devel", shell=True)
subprocess.call("git push", shell=True)