diff --git a/.dockerignore b/.dockerignore index 15f6c53b..60864019 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,6 @@ .git TODO db/ -docs/guide +docs/guide/ +misc/ perl-mcrypt/ diff --git a/misc/usb_maker.py b/misc/usb_maker.py new file mode 100755 index 00000000..52adb746 --- /dev/null +++ b/misc/usb_maker.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +# Import the certificate and the guide into the usb keys +# It needs a file (teams) which contains "certificate_name number" +# certificate_name : is the name of the file into the cert/ folder +# number : how many usb stick it must copy +# A guide.pdf must also be present + +import os + +separator = ' ' +device = '/dev/sdb1' + +with open("teams") as f: + for line in f: + cert, members = line.split(separator) + for x in range(0,int(members)): + raw_input("Insert usb AND THEN press enter") + os.system("sleep 4") + os.system("mkfs.vfat " + device) + os.system("mount " + device + " /media") + os.system("cp -v cert/" + cert + " guide.pdf /media") + os.system("umount /media") + print "## " + cert + " was copied to usb device " + x + "/" + members + os.system("sleep 0.4") + print "You may eject the usb key" + print "Next Team" +print "DONE"