mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
Fixed nux-env and taskie
This commit is contained in:
parent
b04b28f5ea
commit
1cc5b48e4f
4 changed files with 43 additions and 12 deletions
|
|
@ -5,7 +5,7 @@
|
|||
## highlight:: <language> <file>
|
||||
|
||||
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";
|
||||
|
|
|
|||
41
bin/nux-env
41
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:: <inc>
|
||||
## Displays help for specified nuxs-env library.
|
||||
##
|
||||
function :help.library name {
|
||||
nux.log debug "Library"
|
||||
if [ -e "$NUX_INC_DIR/$name.inc.sh" ] {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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=""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue