lyp 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/install_release.sh +1 -1
- data/lib/lyp/package.rb +6 -1
- data/lib/lyp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da31da8efa75b8704dab5d48b0c44173cae0d9ff
|
4
|
+
data.tar.gz: da5431609dfffd0e2a0f813231ced74b17a47878
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6dc9a5578f26af2c369a76cb8c9e1798cfd563c8a9bdb620f55dc25b8d75f39aa8a4a93f377ebacc4c9ebfff7b8912765c2a8831c5f9e11cb80eb94a3ea6b54
|
7
|
+
data.tar.gz: ba944bce979da2914064406b47ef8dcccd09e52069d32c12c637ba0c37e3415373b93695f3ef29b56fdca72624bbac0437456808314309856a8e746414d328f8
|
data/README.md
CHANGED
@@ -53,7 +53,7 @@ or with Wget:
|
|
53
53
|
wget -qO- https://git.io/getlyp | bash
|
54
54
|
```
|
55
55
|
|
56
|
-
**Note**: installing the standalone release of lyp requires
|
56
|
+
**Note**: installing the standalone release of lyp requires having git on your machine.
|
57
57
|
|
58
58
|
### How lyp works
|
59
59
|
|
@@ -209,10 +209,10 @@ In order to facilitate writing complex packages, lyp defines a few lilypond comm
|
|
209
209
|
|
210
210
|
The following variables are defined:
|
211
211
|
|
212
|
+
- `lyp-current-package-dir` - the absolute directory path for the current package
|
212
213
|
- `lyp-input-filename` - the absolute path for the user's file being compiled
|
213
214
|
- `lyp-input-dirname` - the absolute directory path for the user's file being compiled
|
214
215
|
- `lyp-cwd` - the current working directory
|
215
|
-
- `current-package-dir` - the absolute directory path for the current package
|
216
216
|
|
217
217
|
In addition, lyp provides the `\pinclude` command for including files residing in the current package using relative paths. The `\pinclude` commands loads a given file only once:
|
218
218
|
|
data/bin/install_release.sh
CHANGED
data/lib/lyp/package.rb
CHANGED
@@ -73,11 +73,15 @@ module Lyp::Package
|
|
73
73
|
info[:version]
|
74
74
|
end
|
75
75
|
|
76
|
+
LOCAL_PACKAGE_WRAPPER =
|
77
|
+
"#(set! lyp-current-package-dir \"%s\")\n\\include \"%s\"\n"
|
78
|
+
|
76
79
|
def install_from_local_files(package, version, opts)
|
77
80
|
version =~ /^([^\:]+)\:(.+)$/
|
78
81
|
version, local_path = $1, $2
|
79
82
|
|
80
83
|
entry_point_path = nil
|
84
|
+
local_path = File.expand_path(local_path)
|
81
85
|
if File.directory?(local_path)
|
82
86
|
ly_path = File.join(local_path, "package.ly")
|
83
87
|
if File.file?(ly_path)
|
@@ -91,13 +95,14 @@ module Lyp::Package
|
|
91
95
|
raise "Could not find #{local_path}"
|
92
96
|
end
|
93
97
|
|
98
|
+
entry_point_dirname = File.dirname(entry_point_path)
|
94
99
|
package_path = "#{Lyp.packages_dir}/#{package}@#{version}"
|
95
100
|
package_ly_path = "#{package_path}/package.ly"
|
96
101
|
|
97
102
|
FileUtils.rm_rf(package_path)
|
98
103
|
FileUtils.mkdir_p(package_path)
|
99
104
|
File.open(package_ly_path, 'w+') do |f|
|
100
|
-
f <<
|
105
|
+
f << LOCAL_PACKAGE_WRAPPER % [entry_point_dirname, entry_point_path]
|
101
106
|
end
|
102
107
|
|
103
108
|
{version: version, path: package_path}
|
data/lib/lyp/version.rb
CHANGED