X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Flilypond-book.py;h=9c49508d7a85bfba912400108a31d345be678b97;hb=ca6e130e62a717b99db393f7262c9b34cb3d127d;hp=903e5e522176b6a31b97a1edd424ae1179dda3a5;hpb=2d93d73606b64e39c9b4cbb451a9c5f3887c60ec;p=lilypond.git diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 903e5e5221..9c49508d7a 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -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 @@ -544,10 +549,12 @@ def do_file (input_filename, included=False): in_handle = file (input_fullname) if input_filename == '-': + global_options.input_dir = os.getcwd () input_base = 'stdin' elif included: input_base = os.path.splitext (input_filename)[0] else: + global_options.input_dir = os.path.split (input_absname)[0] input_base = os.path.basename ( os.path.splitext (input_filename)[0])