1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00
nux-env/inc/taskie/backend.dir.inc.sh
root a7b55553ad Nuweb drop
Signed-off-by: root <root@tdm-cloud.(none)>
2019-03-09 12:32:11 +01:00

20 lines
548 B
Bash
Executable file

nux.log debug "Backend Dir loaded"
backend.dir.detect() {
local dottaskie=$(nuxfs.closest .taskie "$1")
local dottaskiedir=$(nuxfs.closest .taskie.self "$1")
if [ -d "$dottaskie" ]; then
echo "$dottaskie"
elif [ -f "$dottaskie" -a "$(yaml r "$dottaskie" backend)" = "dir:self" ]; then
dirname "$dottaskie"
fi
}
backend.dir.with() {
dir_repository=$(echo $backendId | cut -d: -f2)
}
backend.dir.labels() {
find "$dir_repository" -type d | grep -v "^\." | grep -v "/\." |xargs -n1 realpath --relative-to="$dir_repository"
}