diff --git a/bin/nudsl b/bin/nudsl index 86678b3..149a481 100755 --- a/bin/nudsl +++ b/bin/nudsl @@ -5,7 +5,7 @@ ## highlight:: task.highlight() { - + nux.use nux/nuxsh nux.dsl.process highlight nux.nuxsh.language.def "$2" } @@ -23,8 +23,10 @@ task.plan.compile() { } task.plan.preview() { - nux.dsl.plan nux.nuxsh.language "$2" - plan="$(nudsl.plan.file "$1" "$2")" + nux.use nux/nuxsh + nux.dsl.plan nux.nuxsh.language.def "$1" + plan="$(nudsl.plan.file nux.nuxsh.language.def "$1")" + nux.log info "Plan file: $plan" if [ -e "$plan" ]; then if [ -n "$(which pygmentize)" ]; then pygmentize -l bash "$plan"; diff --git a/bin/nux-env b/bin/nux-env index e43df2a..1b6fd5c 100755 --- a/bin/nux-env +++ b/bin/nux-env @@ -1,9 +1,9 @@ #!/usr/bin/env nuxr-nuxsh ## Portable *nix environment by tonydamage -## status:: -## Show status of nux-env installation - +## +## status:: +## Show status of nux-env installation @namespace task. { function :status { echo nux-env folder: $NUX_ENV_DIR @@ -12,8 +12,9 @@ popd > /dev/null } -## update:: -## pulls latest nux-env from repository. +## +## update:: +## pulls latest nux-env from repository. function :update { pushd $NUX_ENV_DIR > /dev/null git stash @@ -22,12 +23,35 @@ popd > /dev/null } +## ## install:: ## Install nux-env recommended binaries if not present function :install { - : - + echo $NUX_ENV_DIR + :symlink bashrc .bashrc } + + function :symlink source target { + local env=~ + target=${env}/${target} + source=${NUX_ENV_DIR}/${source} + real_source=$(realpath $source) + nux.log debug "$target" is symlink to "$real_source" + if [ -e "$target" ] { + nux.log debug "$target" exists + if [ -h "$target" ] { + link_target=$(realpath $target) + if [ "$real_source" = "$link_target" ] { + nux.log debug "$target" is already symlink to $source + return; + } + nux.log debug "$target" is symlink to "$link_target" + + } + } + } + +## ## fixmes:: ## List all fixmes for nux-env function :fixmes { @@ -35,9 +59,10 @@ find "$NUX_INC_DIR" -iname "*.sh" | xargs fgrep -n FIXME } + +## ## help library:: ## Displays help for specified nuxs-env library. -## function :help.library name { nux.log debug "Library" if [ -e "$NUX_INC_DIR/$name.inc.sh" ] { diff --git a/bin/nux-runner b/bin/nux-runner index 979c0b4..ade1985 100755 --- a/bin/nux-runner +++ b/bin/nux-runner @@ -132,6 +132,9 @@ if [ -n "$NUX_SCRIPT" ]; then NUX_SCRIPTNAME=$(basename "$NUX_SCRIPT") + NUX_APP_NAME="${NUX_APP_NAME:=$NUXR_APP_NAME}" + NUX_APP_DIR="${NUX_APP_DIR:=$NUXR_APP_DIR}" + nux.log trace "NUX_SCRIPT env: " $(set | grep NUX_SCRIPT) if [ -z "$NUX_NO_INCLUDE" ] then diff --git a/bin/taskie b/bin/taskie index 1051463..6f88a4f 100755 --- a/bin/taskie +++ b/bin/taskie @@ -14,7 +14,7 @@ nux.use taskie/backend.dir function with.backend backendId { backend=$(echo $backendId | cut -d: -f1); - nux.exec.optional backend.$backend.with; + nux.exec.optional backend.$backend.with "$backendId"; } function endwith.backend { @@ -40,6 +40,7 @@ function endwith.backend { if ! backend.$backend.issue.exists "$@" ; then local labels=$(backend.$backend.labels.id) nux.log debug "Labels: $labels" + label=$(echo "$labels" | grep -G "^$1:") local labelName="" local labelId=""