mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-13 13:44:28 +01:00
Compare commits
3 commits
bd6e1d49b2
...
f69327b2ca
| Author | SHA1 | Date | |
|---|---|---|---|
| f69327b2ca | |||
| a93306cb79 | |||
| 5b31a1c69e |
3 changed files with 52 additions and 3 deletions
46
bin/foldy
Executable file
46
bin/foldy
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env nuxr-nuxsh
|
||||
nux.use nux/fs
|
||||
|
||||
CLOSEST=$(nux.fs.closest .foldy.nuxsh)
|
||||
|
||||
## list:: List Available foldy integrated directories
|
||||
@command list {
|
||||
#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 {
|
||||
echo "Tasks defined in ${NC_White}$CLOSEST${NC_No}"
|
||||
echo "Custom Help"
|
||||
nux.help.comment "$CLOSEST"
|
||||
|
||||
}
|
||||
|
||||
@namespace nuxr.run. {
|
||||
function :additional TASK {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ type ffmpeg > /dev/null 2>&1 && FFMPEG_OR_LIBAV=ffmpeg
|
|||
type avconv > /dev/null 2>&1 && FFMPEG_OR_LIBAV=avconv
|
||||
type gm > /dev/null 2>&1 && NUX_MAGICK=gm
|
||||
|
||||
QUALITY=${QUALITY:=95}
|
||||
QUALITY=${QUALITY:=90}
|
||||
DUPLICATE_THRESHOLD=${DUPLICATE_THRESHOLD:=90%}
|
||||
SKIP_CHECK=no_skip
|
||||
nux.log debug "FFMPEG: $FFMPEG_OR_LIBAV Magick: $NUX_MAGICK"
|
||||
|
|
|
|||
|
|
@ -8,15 +8,18 @@ nux.use nux/help
|
|||
@namespace nuxr. {
|
||||
function :run TASK {
|
||||
# FIXME: Add default task
|
||||
if check:function task.$TASK {
|
||||
if nux.check.function task.$TASK; then
|
||||
nux.log debug "Running task: $TASK";
|
||||
nux.log debug "Working dir: $(pwd)"
|
||||
task.$TASK "$@" # Runs task
|
||||
elif nux.check.function nuxr.run.additional; then
|
||||
nux.log debug "Running additional task: $TASK";
|
||||
nuxr.run.additional "$TASK" "$@"
|
||||
else
|
||||
echo "$NUX_SCRIPTNAME: Unrecognized task '$TASK' not available."
|
||||
echo "Try '$NUX_SCRIPTNAME help' for more information."
|
||||
return -1
|
||||
}
|
||||
fi
|
||||
}
|
||||
|
||||
function :run.subtask SUBTASK {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue