1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00
nux-env/bin/foldy
2025-07-23 13:50:21 +02:00

35 lines
No EOL
898 B
Text
Executable file

#!/usr/bin/env nuxr-nuxsh
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.
@command list {
nux.fs.info "Listing foldy files in $CLOSEST"
}
@command help.additional {
echo "Tasks defined in ${NC_White}$CLOSEST${NC_No}"
echo "Custom Help"
nux.help.comment "$CLOSEST"
}
nuxr.run.additional {
if [[ -f "$CLOSEST" ]]; then
nux.log debug Loading sources fron "$CLOSEST"
nux.nuxsh.use "$CLOSEST"
fi
if nux.check.function task.$TASK; then
nux.log debug "Running task: $TASK";
nux.log debug "Working dir: $(pwd)"
task.$TASK "$@" # Runs task
else
echo "$NUX_SCRIPTNAME: Unrecognized task '$TASK' not available."
echo "Try '$NUX_SCRIPTNAME help' for more information."
return -1
fi
}