X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Flilypond-book.py;h=9cdd14742b76e1dda97211f351f818fdc8d15921;hb=c39d188d28fdc84cef8cbaea7b8d6e2fb718c30f;hp=6d424a18521c289991723363c7f04381dc8e042c;hpb=aefc5a4057a0a61f1d7e4411cc1c5061d9aea6b7;p=lilypond.git diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 6d424a1852..9cdd14742b 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -112,7 +112,7 @@ def warranty (): %s %s -''' % ( _ ('Copyright (c) %s by') % '2001--2012', +''' % ( _ ('Copyright (c) %s by') % '2001--2014', '\n '.join (authors), _ ("Distributed under terms of the GNU General Public License."), _ ("It comes with NO WARRANTY."))) @@ -277,6 +277,11 @@ if 'bindir' in globals () and bindir: if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary): lilypond_binary = 'lilypond' +# Need to shell-quote, issue 3468 + +import pipes +lilypond_binary = pipes.quote (lilypond_binary) + global_options = None @@ -438,7 +443,10 @@ def split_output_files(directory): Return value is a set of strings. """ files = [] - for subdir in glob.glob (os.path.join (directory, '[a-f0-9][a-f0-9]')): + def globquote(x): + return re.sub ("[][*?]", r"[\g<0>]", x) + for subdir in glob.glob (os.path.join (globquote (directory), + '[a-f0-9][a-f0-9]')): base_subdir = os.path.split (subdir)[1] sub_files = [os.path.join (base_subdir, name) for name in os.listdir (subdir)]