55
55
# Copy trampoline/trampoline to $target/bin.
56
56
# chown and chmod the installed trampoline.
57
57
# Copy www/ to $target.
58
# Copy jail/ to jails template directory (unless --nojail specified).
58
# Copy jail/ to jails __staging__ directory (unless --nojail specified).
530
530
Copy trampoline/trampoline to $target/bin.
531
531
chown and chmod the installed trampoline.
532
532
Copy www/ to $target.
533
Copy jail/ to jails template directory (unless --nojail specified).
533
Copy jail/ to jails __staging__ directory (unless --nojail specified).
534
534
Copy subjects/ to subjects directory (unless --nosubjects specified).
536
536
--nojail Do not copy the jail.
1169
1169
# Copy the local jail directory built by the build action
1170
# to the jails template directory (it will be used as a template
1171
# for all the students' jails).
1172
action_copytree('jail', os.path.join(jail_base, 'template'), dry)
1170
# to the jails __staging__ directory (it will be used to help build
1171
# all the students' jails).
1172
action_copytree('jail', os.path.join(jail_base, '__staging__'), dry)
1173
1173
if not nosubjects:
1174
1174
# Copy the subjects and exercises directories across
1175
1175
action_copylist(install_list.list_subjects, subjects_base, dry,
1216
1216
print >>sys.stderr, "(I need to chown some files)."
1219
# Update the template jail directory in case it hasn't been installed
1219
# Update the staging jail directory in case it hasn't been installed
1221
action_copytree('jail', os.path.join(jail_base, 'template'), dry)
1221
action_copytree('jail', os.path.join(jail_base, '__staging__'), dry)
1223
1223
# Re-link all the files in all students jails.
1224
1224
for dir in os.listdir(jail_base):
1225
if dir == 'template': continue
1225
if dir == '__staging__': continue
1226
1226
# First back up the student's home directory
1227
1227
temp_home = os.tmpnam()
1228
1228
action_rename(os.path.join(jail_base, dir, 'home'), temp_home, dry)
1229
1229
# Delete the student's jail and relink the jail files
1230
action_linktree(os.path.join(jail_base, 'template'),
1230
action_linktree(os.path.join(jail_base, '__staging__'),
1231
1231
os.path.join(jail_base, dir), dry)
1232
1232
# Restore the student's home directory
1233
1233
action_rename(temp_home, os.path.join(jail_base, dir, 'home'), dry)