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
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue