From e98c5becba67d642b5fd5c6e4a206d79749e8953 Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 22 Nov 2018 22:07:24 +1100 Subject: bundle binary files as URLs --- build/util.moon | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 build/util.moon (limited to 'build/util.moon') 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 +} -- cgit v1.2.3