diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2018-11-22 11:07:24 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2018-11-22 11:07:24 +0000 |
| commit | e98c5becba67d642b5fd5c6e4a206d79749e8953 (patch) | |
| tree | 34965a21413107e089a77da8886dd85022c9e651 /build/util.moon | |
| parent | move glitch cube, torus4d to experiments (diff) | |
| download | mmm-e98c5becba67d642b5fd5c6e4a206d79749e8953.tar.gz mmm-e98c5becba67d642b5fd5c6e4a206d79749e8953.zip | |
bundle binary files as URLs
Diffstat (limited to 'build/util.moon')
| -rw-r--r-- | build/util.moon | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/build/util.moon b/build/util.moon new file mode 100644 index 0000000..b9c9613 --- /dev/null +++ b/build/util.moon @@ -0,0 +1,16 @@ +require 'lfs' + +get_path = (root) -> + cwd = lfs.currentdir! + path = '' + + while root\find '^%.%./' + root = root\match '^%.%./(.*)' + cwd, trimmed = cwd\match '(.*)(/[^/]+)$' + path = trimmed .. path + + path + +{ + :get_path +} |
