mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
taskie: Updated backends to use common code.
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
parent
70dbc4dc1d
commit
cfad8b1576
6 changed files with 174 additions and 98 deletions
20
inc/taskie/backend.dir.inc.sh
Normal file
20
inc/taskie/backend.dir.inc.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue