3 #=======================================================================
5 # File ID: 09750024-f729-11e5-a74f-02010e0a6634
7 # Set up the initial files for a LilyPond project
9 # Author: Øyvind A. Holm <sunny@sunbase.org>
10 # License: GNU General Public License version 2 or later.
11 #=======================================================================
25 " -n "$progname" -- "$@
")"
26 test "$?" = "0" ||
exit 1
34 -h|
--help) opt_help
=1; shift ;;
35 -q|
--quiet) opt_quiet
=$
(($opt_quiet + 1)); shift ;;
36 -v|
--verbose) opt_verbose
=$
(($opt_verbose + 1)); shift ;;
37 --version) echo $progname $VERSION; exit 0 ;;
39 *) echo $progname: Internal error
>&2; exit 1 ;;
42 opt_verbose
=$
(($opt_verbose - $opt_quiet))
44 if test "$opt_help" = "1"; then
45 test $opt_verbose -gt 0 && { echo; echo $progname $VERSION; }
48 Set up the initial files for a LilyPond project
50 Usage: $progname [options] TYPE PROJECTNAME
52 Argument \$1 is the type of project. These values are accepted:
53 band - pop/rock band with one vocal, two guitars, one bass, piano and
56 piano - standard setup for one piano
58 Argument \$2 is the name of the directory to create and the name of the
59 main .ly file, which will be named "PROJECTNAME.ly".
66 Be more quiet. Can be repeated to increase silence.
68 Increase level of verbosity. Can be repeated.
70 Print version information.
77 echo $progname: I need two arguments with
type and project name
>&2
84 mkdir
"$projname" ||
{
85 echo $progname: $projname: Cannot create directory
>&2
89 echo $progname: $projname: Cannot chdir
>&2
93 if test "$projtype" = "band"; then
94 for f
in bass chords click drums guitar1 guitar2 \
95 piano-lower piano-upper vocal1
; do
96 std ly
/$f.ily
$f.ily
-t "projname=$projname"
98 std ly
/band.ly
"$projname.ly" -t "projname=$projname"
99 for f
in bass chords click drums guitar1 guitar2 piano vocal1
; do
100 std ly
/$f.ly
$f.ly
-t "projname=$projname"
102 elif test "$projtype" = "guitar"; then
103 std ly
/chords.ily chords.ily
-t "projname=$projname"
104 std ly
/chords.ly chords.ly
-t "projname=$projname"
105 std ly
/click.ily click.ily
-t "projname=$projname"
106 std ly
/click.ly click.ly
-t "projname=$projname"
107 std ly
/guitar.ily guitar.ily
-t "projname=$projname"
108 std ly
/guitar.ly
"$projname.ly" -t "projname=$projname"
109 elif test "$projtype" = "piano"; then
110 std ly
/chords.ily chords.ily
-t "projname=$projname"
111 std ly
/chords.ly chords.ly
-t "projname=$projname"
112 std ly
/click.ily click.ily
-t "projname=$projname"
113 std ly
/click.ly click.ly
-t "projname=$projname"
114 std ly
/piano-lower.ily piano-lower.ily
-t "projname=$projname"
115 std ly
/piano-upper.ily piano-upper.ily
-t "projname=$projname"
116 std ly
/piano.ly
"$projname.ly" -t "projname=$projname"
118 echo $progname: $projtype: Unknown project
type >&2
122 std ly
/defs.ily defs.ily
123 std ly
/Makefile Makefile
-t "projname=$projname"
124 git ignore .version.ily
$projname.mp3
$projname.opus \
125 $projname.pdf
$projname.wav