-# Filename: grml2usb
-# Purpose: install grml system to usb device
-# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# Bug-Reports: see http://grml.org/bugs/
-# License: This file is licensed under the GPL v2 or any later version.
-################################################################################
-
-# TODO
-# * strongly improve error handling :)
-# * implement mount handling
-# * write error messages to stderr
-# * log wrapper (log important messages to syslog, depending on loglevel -> logging module)
-# * trap handling (umount devices when interrupting?)
-# * provide progress bar?
-# * graphical version?
-# * integrate https://www.mirbsd.org/cvs.cgi/src/sys/arch/i386/stand/mbr/mbr.S?rev=HEAD;content-type=text%2Fplain ?
-# -> gcc -D_ASM_SOURCE -D__BOOT_VER=\"GRML\" -DBOOTMANAGER -c mbr.S; ld
-# -nostdlib -Ttext 0 -N -Bstatic --oformat binary mbr.o -o mbrmgr
-
-prog_version = "0.0.1"
-
-import os, re, subprocess, sys
+# -*- coding: utf-8 -*-
+"""
+grml2usb
+~~~~~~~~
+
+This script installs a grml system to a USB device
+
+:copyright: (c) 2009 by Michael Prokop <mika@grml.org>
+:license: GPL v2 or any later version
+:bugreports: http://grml.org/bugs/
+
+TODO
+----
+
+* improve error handling :)
+* implement mount handling
+* log wrapper (-> logging module)
+* implement logic for storing information about copied files
+ -> register every single file?
+* trap handling (like unmount devices when interrupting?)
+* get rid of all TODOs in code :)
+* graphical version
+"""
+
+import os, re, subprocess, sys, tempfile