1 ;------------------------------------------------------------------;
2 ; opus_libre -- 10-score.scm ;
4 ; (c) 2008-2010 Valentin Villenave <valentin@villenave.net> ;
6 ; opus_libre is a free framework for GNU LilyPond: you may ;
7 ; redistribute it and/or modify it under the terms of the GNU ;
8 ; General Public License, version 3 or later: gnu.org/licenses ;
10 ;------------------------------------------------------------------;
14 ;; Browsing scores sub-directory
15 (define conf:scores-dir "scores")
16 (define conf:default-score "etc/blank")
18 (define-public (defined-string? sym)
19 (string? (ly:parser-lookup parser sym)))
21 (define-public (exists? loc) (access? loc F_OK))
24 (if (defined-string? 'scores)
25 (let* ((score-subdir (ly:parser-lookup parser 'scores))
27 (string-append conf:scores-dir "/" score-subdir)))
28 (if (exists? full-dir)
30 (begin (ly:warning "Score directory not found: ~a.
31 A blank score will be created instead." full-dir)
33 (begin (ly:warning "Score directory not defined!
34 A blank score will be created instead.")