mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
Added foldy management tools
This commit is contained in:
parent
a93306cb79
commit
f69327b2ca
1 changed files with 30 additions and 19 deletions
19
bin/foldy
19
bin/foldy
|
|
@ -3,10 +3,19 @@ nux.use nux/fs
|
|||
|
||||
CLOSEST=$(nux.fs.closest .foldy.nuxsh)
|
||||
|
||||
## suffix:: <file>
|
||||
## Adds random UUID suffix to file names if file does not have UUID in name already.
|
||||
## list:: List Available foldy integrated directories
|
||||
@command list {
|
||||
nux.fs.info "Listing foldy files in $CLOSEST"
|
||||
#nux.fs.info "Listing foldy files in $CLOSEST"
|
||||
find -iname ".foldy.nuxsh" | while read line; do
|
||||
echo "${line%.foldy.nuxsh}"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
## exec:: <path> <command> [<args>]
|
||||
## Run foldy command in directory.
|
||||
@command run path command {
|
||||
(cd $path; foldy $command "$@" )
|
||||
}
|
||||
|
||||
@command help.additional {
|
||||
|
|
@ -16,7 +25,8 @@ CLOSEST=$(nux.fs.closest .foldy.nuxsh)
|
|||
|
||||
}
|
||||
|
||||
nuxr.run.additional {
|
||||
@namespace nuxr.run. {
|
||||
function :additional TASK {
|
||||
if [[ -f "$CLOSEST" ]]; then
|
||||
nux.log debug Loading sources fron "$CLOSEST"
|
||||
|
||||
|
|
@ -32,4 +42,5 @@ nuxr.run.additional {
|
|||
echo "Try '$NUX_SCRIPTNAME help' for more information."
|
||||
return -1
|
||||
fi
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue