lyp-win 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/install_release.sh +19 -14
- data/lib/lyp/lilypond.rb +18 -2
- data/lib/lyp/resolver.rb +12 -4
- data/lib/lyp/system.rb +4 -5
- data/lib/lyp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2658b2c6b915cfcb4aea08d0c7a7297eacff23d2
|
4
|
+
data.tar.gz: 6d21e73c9255593957c147c553601f808e0a9170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 138b589dbbe5d989782bf2dc9309ea946196101f72d8845ee6c86b1c4ed3e762fa4b780476a31f9b55aa5dc5d52599e565108a545501cdcf41f0ebdb4f9af64c
|
7
|
+
data.tar.gz: 2b9f8378409264e79bd77f88caccde271697cb33b628fcf700eca698753a067046b112b24208c8d7fd2c35a216de28968dc85f1b8987fd2f51696ce6d214813b
|
data/README.md
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
<a href="https://github.com/lyp-packages/index#readme">The lyp package index</a>
|
6
6
|
</p>
|
7
7
|
|
8
|
-
# lyp - The Lilypond Swiss
|
8
|
+
# lyp - The Lilypond Swiss Army Knife
|
9
9
|
|
10
|
-
Use lyp to install and manage packages for Lilypond,
|
10
|
+
Use lyp to install and manage packages for [Lilypond](http://lilypond.org/), install and manage multiple versions of Lilypond on your machine, and improve your Lilypond workflow.
|
11
11
|
|
12
12
|
__Code reuse__: lyp lets you install packages that act as Lilypond code libraries and can be used to enhance your Lilypond files with additional functionality. Packages can depend on other packages. Lyp resolves both direct and transitive package dependencies, and automatically selects the correct version to use for each package.
|
13
13
|
|
data/bin/install_release.sh
CHANGED
@@ -1,25 +1,11 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
echo "Detecting latest lyp version..."
|
4
|
-
LATEST_RELEASE=`curl -s https://github.com/noteflakes/lyp/releases/latest`
|
5
|
-
VERSION_REGEX="tag/v([0-9\.]+)"
|
6
|
-
if [[ $LATEST_RELEASE =~ $VERSION_REGEX ]]
|
7
|
-
then
|
8
|
-
LYP_VERSION="${BASH_REMATCH[1]}"
|
9
|
-
else
|
10
|
-
echo "Could not get latest version from GitHub."
|
11
|
-
fi
|
12
|
-
|
13
|
-
WORKDIR="/tmp/lyp-release-installer"
|
14
|
-
URL_BASE="https://github.com/noteflakes/lyp/releases/download/v$LYP_VERSION"
|
15
|
-
|
16
3
|
shopt -s extglob
|
17
4
|
set -o errtrace
|
18
5
|
set -o errexit
|
19
6
|
|
20
7
|
fail() { log "\nERROR: $*\n"; exit 1; }
|
21
8
|
has() { type "$1" > /dev/null 2>&1; }
|
22
|
-
|
23
9
|
download() {
|
24
10
|
if has "curl"; then
|
25
11
|
curl -L -o $*
|
@@ -30,6 +16,25 @@ download() {
|
|
30
16
|
fi
|
31
17
|
}
|
32
18
|
|
19
|
+
echo "Detecting latest lyp version..."
|
20
|
+
if has "curl"; then
|
21
|
+
LATEST_RELEASE=`curl -s https://github.com/noteflakes/lyp/releases/latest`
|
22
|
+
elif has "wget"; then
|
23
|
+
LATEST_RELEASE=`wget -qO- https://github.com/noteflakes/lyp/releases/latest`
|
24
|
+
else
|
25
|
+
fail "Could not find curl or wget"
|
26
|
+
fi
|
27
|
+
|
28
|
+
VERSION_REGEX="tag/v([0-9\.]+)"
|
29
|
+
if [[ $LATEST_RELEASE =~ $VERSION_REGEX ]]
|
30
|
+
then
|
31
|
+
LYP_VERSION="${BASH_REMATCH[1]}"
|
32
|
+
else
|
33
|
+
echo "Could not get latest version from GitHub."
|
34
|
+
fi
|
35
|
+
|
36
|
+
WORKDIR="/tmp/lyp-release-installer"
|
37
|
+
URL_BASE="https://github.com/noteflakes/lyp/releases/download/v$LYP_VERSION"
|
33
38
|
PLATFORM=`uname -sp`
|
34
39
|
case $PLATFORM in
|
35
40
|
"Linux x86_64")
|
data/lib/lyp/lilypond.rb
CHANGED
@@ -24,7 +24,7 @@ module Lyp::Lilypond
|
|
24
24
|
when '-A', '--auto-install-deps'
|
25
25
|
options[:resolve] = true
|
26
26
|
when '-c', '--cropped'
|
27
|
-
argv_clean
|
27
|
+
argv_clean.concat ['-dbackend=eps', '-daux-files=#f']
|
28
28
|
when '-E', '--env'
|
29
29
|
unless ENV['LILYPOND_VERSION']
|
30
30
|
STDERR.puts "$LILYPOND_VERSION not set"
|
@@ -33,6 +33,11 @@ module Lyp::Lilypond
|
|
33
33
|
options[:use_version] = ENV['LILYPOND_VERSION']
|
34
34
|
when '-F', '--force-version'
|
35
35
|
options[:force_version] = true
|
36
|
+
when '-I', '--include'
|
37
|
+
path = argv.shift
|
38
|
+
options[:include_paths] ||= []
|
39
|
+
options[:include_paths] << path
|
40
|
+
argv_clean << "--include=#{path}"
|
36
41
|
when '-n', '--install'
|
37
42
|
options[:install] = true
|
38
43
|
when '-O', '--open'
|
@@ -46,7 +51,7 @@ module Lyp::Lilypond
|
|
46
51
|
when '-R', '--raw'
|
47
52
|
options[:raw] = true
|
48
53
|
when '-S', '--snippet'
|
49
|
-
argv_clean
|
54
|
+
argv_clean.concat ['-dbackend=eps', '-daux-files=#f', '--png', '-dresolution=600']
|
50
55
|
options[:snippet_paper_preamble] = true
|
51
56
|
when '-u', '--use'
|
52
57
|
options[:use_version] = argv.shift
|
@@ -98,6 +103,9 @@ module Lyp::Lilypond
|
|
98
103
|
end
|
99
104
|
|
100
105
|
def compile(argv, opts = {})
|
106
|
+
opts[:include_paths] ||= []
|
107
|
+
opts[:include_paths] << current_lilypond_include_path
|
108
|
+
|
101
109
|
unless argv.last == '-'
|
102
110
|
fn = Lyp.wrap(argv.pop, opts)
|
103
111
|
argv << fn
|
@@ -159,11 +167,19 @@ module Lyp::Lilypond
|
|
159
167
|
settings[:current]
|
160
168
|
end
|
161
169
|
|
170
|
+
def current_lilypond_base_path
|
171
|
+
File.expand_path("#{File.dirname(current_lilypond)}/..")
|
172
|
+
end
|
173
|
+
|
162
174
|
def current_lilypond_bin_path
|
163
175
|
lilypond = current_lilypond
|
164
176
|
lilypond && File.dirname(lilypond)
|
165
177
|
end
|
166
178
|
|
179
|
+
def current_lilypond_include_path
|
180
|
+
File.join(current_lilypond_base_path, "share/lilypond/current/ly")
|
181
|
+
end
|
182
|
+
|
167
183
|
def current_lilypond_version
|
168
184
|
path = current_lilypond
|
169
185
|
version = File.basename(File.expand_path("#{File.dirname(path)}/../.."))
|
data/lib/lyp/resolver.rb
CHANGED
@@ -216,13 +216,21 @@ module Lyp
|
|
216
216
|
return if $1 == 'null'
|
217
217
|
ref = $2
|
218
218
|
end
|
219
|
-
qualified_path = File.expand_path(ref, dir)
|
220
219
|
|
221
|
-
|
222
|
-
|
220
|
+
full_path = find_include_file(ref, dir, location)
|
221
|
+
queue_file_for_processing(full_path, leaf)
|
222
|
+
end
|
223
|
+
|
224
|
+
def find_include_file(ref, dir, location)
|
225
|
+
search_paths = [dir]
|
226
|
+
search_paths += @opts[:include_paths] if @opts[:include_paths]
|
227
|
+
|
228
|
+
search_paths.each do |path|
|
229
|
+
full_path = File.expand_path(ref, path)
|
230
|
+
return full_path if File.file?(full_path)
|
223
231
|
end
|
224
232
|
|
225
|
-
|
233
|
+
error("Missing include file specified in %s", location)
|
226
234
|
end
|
227
235
|
|
228
236
|
def process_require_command(ref, dir, leaf, opts, location)
|
data/lib/lyp/system.rb
CHANGED
@@ -14,14 +14,13 @@ module Lyp::System
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def find_rugged_gem
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
dep = Gem::Dependency.new("rugged", RUGGED_REQ)
|
18
|
+
found = !dep.matching_specs.empty?
|
19
|
+
|
21
20
|
require_rugged_gem if found
|
22
21
|
found
|
23
22
|
end
|
24
|
-
|
23
|
+
|
25
24
|
def require_rugged_gem
|
26
25
|
gem 'rugged', RUGGED_REQ.to_s
|
27
26
|
req_ext 'rugged'
|
data/lib/lyp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lyp-win
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sharon Rosner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|