From 6aa5024811f79bf5a726de040c907916bde5417e Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Fri, 8 Mar 2019 19:44:05 -0800 Subject: [PATCH] Update comments on ddusb-exclude.conf and regex in ddusb script --- config/ddusb-exclude.conf | 7 ++++--- ddusb.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/ddusb-exclude.conf b/config/ddusb-exclude.conf index f24edfe..a659e51 100644 --- a/config/ddusb-exclude.conf +++ b/config/ddusb-exclude.conf @@ -1,3 +1,4 @@ -## File for excluding particular files from being written to -## Write one device per line, shell-style globs are accepted i.e. /dev/sda? -## Lines beginning with "#" and ";" are ignored +# File for excluding block devices from being written to +# Write one device per line, shell-style globs are accepted i.e. /dev/sda* +# Brace expansion is not supported +# Lines beginning with "#" and ";" are ignored diff --git a/ddusb.py b/ddusb.py index 354513a..108382c 100644 --- a/ddusb.py +++ b/ddusb.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -"""Write an ISO image to a usb drive using dd.""" +"""Wrapper script for using dd to write to a USB drive.""" import argparse import glob @@ -8,7 +8,7 @@ import re import subprocess # ========== Constants ========== -COMMENT_PATTERN = "[#;]" +COMMENT_PATTERN = "^[#;]" EXCLUDE_FILE = "/etc/helper-scripts/ddusb-exclude.conf"