Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (32 sloc) 1.08 KB
# updatefromvar.rb
# finds the file's development version(s)
# in the development directory, searches it for
# chants marked as selected for inclusion in the main file
# and updates the main file.
# The script expects being run in the project root directory
# and receiving relative paths as arguments.
# Development file for a given file is file
# variationes/ and all files matching pattern
# variationes/path_*.ly
# (this convention expects a particular discipline when giving
# names to main files).
require 'stringio'
require 'optparse'
require_relative 'lib/updatefromvar/updater'
setup = {:partial_files => true}
optparse = do|opts|
opts.on "-P", "--no-partial-files", "Don't consider files variations/ partial files of file /" do
setup[:partial_files] = false
updater ='variationes', STDOUT)
setup.each_pair {|attr,val| updater.send("#{attr}=", val) }
ARGV.each do |f|
updater.update f
rescue RuntimeError => ex
STDERR.puts ex.message
exit 1
You can’t perform that action at this time.