blob: b9c961379c2fb2b645e22318bb0fe808dc825542 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
}
|