-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsemesterLabSetup.py
45 lines (37 loc) · 1.14 KB
/
semesterLabSetup.py
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
import os
total_labs = 10
cloned = []
old_course_name = "Binghamton-CS140-A0-Fall-2018"
new_course_name = "Binghamton-CS140-Spring2019"
def cloneSemester():
os.system('mkdir semester')
# #start by cloning all assignments
# for i in range(1, total_graded_assignments+1):
# clone = ""
# if(i <= 9):
# x = os.system(f'git clone https://github.com/Binghamton-CS140-A0-Fall-2018/assignment0{i}-{student}.git')
# clone = "assignment0" + str(i)
# else:
# x = os.system(f'git clone https://github.com/Binghamton-CS140-A0-Fall-2018/assignment{i}-{student}.git')
# clone = "assignment" + str(i)
# if x != 0:
# print("Error cloning assignment" + str(i))
# else:
# cloned.append(clone)
#clone all labs
for i in range(1, total_labs+1):
clone = ""
if(i <= 9):
x = os.system(f'git clone https://github.com/{old_course_name}/lab0{i}.git')
clone = "lab0" + str(i)
else:
x = os.system(f'git clone https://github.com/{old_course_name}/lab{i}.git')
clone = "lab" + str(i)
if x != 0:
print("Error cloning lab" + str(i))
else:
cloned.append(clone)
os.system(f'mv lab* semester')
def main():
cloneSemester()
main()