mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
Added small updates.
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
parent
429a0d3258
commit
e7bb96f730
4 changed files with 19 additions and 4 deletions
11
bin/nux-env
11
bin/nux-env
|
|
@ -18,6 +18,17 @@ task.update() {
|
|||
popd > /dev/null
|
||||
}
|
||||
|
||||
## install Install nux-env recommended binaries if not present
|
||||
##
|
||||
task.install() {
|
||||
:
|
||||
|
||||
}
|
||||
|
||||
## help.inc <inc>
|
||||
## Displays help for specified nuxs-env library.
|
||||
##
|
||||
task.help.inc() {
|
||||
local name="$1"
|
||||
nux.help.comment $NUX_INC_DIR/$name.inc.sh
|
||||
}
|
||||
|
|
|
|||
0
inc/dsl/nux.fs.inc.sh
Normal file
0
inc/dsl/nux.fs.inc.sh
Normal file
|
|
@ -1,7 +1,4 @@
|
|||
## #nux-base - NUX Script Base library
|
||||
##
|
||||
|
||||
|
||||
|
||||
readonly NUX_INC_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
|
||||
readonly NUX_ENV_DIR=$(dirname $NUX_INC_DIR)
|
||||
|
|
@ -196,6 +193,13 @@ function nux.help.shelldoc {
|
|||
|
||||
}
|
||||
|
||||
function nux.url.parse {
|
||||
format=${2:-"protocol:\2\nuser:\4\nhost:\5\nport:\7 \npath:\8"}
|
||||
echo "$1" | sed \
|
||||
-re "s/(([^:\/]*):\/\/)?(([^@\/:]*)@)?([^:\/]+)(:([0-9]+))?(\/(.*))?/$format/g"
|
||||
|
||||
}
|
||||
|
||||
NUX_ENV_MACHINE=/usr/
|
||||
NUX_ENV_MACHINE_LOCAL=/usr/local/
|
||||
NUX_ENV_USER_LOCAL=$HOME/.local
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ function nuxfs.file.exists {
|
|||
|
||||
function nuxfs.closest {
|
||||
cmd=$1;
|
||||
cdir=$2;
|
||||
cdir=${2:-$(pwd)};
|
||||
nux.log trace "Searching in: " $cdir;
|
||||
until [ -e "$cdir/$1" -o "$cdir" == "/" ]; do
|
||||
cdir=$(dirname "$cdir");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue