mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
Splitted nuxfs into components.
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
parent
6e5c5986c3
commit
531f55f249
3 changed files with 143 additions and 152 deletions
37
inc/nuxfs.inc.sh
Normal file
37
inc/nuxfs.inc.sh
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
|
||||
function nuxfs.relative {
|
||||
echo "$(nuxfs.dir.get)/$1"
|
||||
}
|
||||
|
||||
function nuxfs.error {
|
||||
local filename=$1; shift;
|
||||
nux.echo.error "$filename"$NC_No: $*;
|
||||
}
|
||||
|
||||
function nuxfs.warning {
|
||||
local filename=$1; shift;
|
||||
nux.echo.warning "$filename"$NC_No: $*;
|
||||
}
|
||||
|
||||
function nuxfs.info {
|
||||
local filename=$1; shift;
|
||||
echo -e $NC_White"$filename"$NC_No: $*;
|
||||
}
|
||||
|
||||
function nuxfs.dir.get {
|
||||
echo ${DIR_ARRAY[${#DIR_ARRAY[@]}-1]}
|
||||
}
|
||||
|
||||
function nuxfs.dir.pop {
|
||||
unset DIR_ARRAY[${#DIR_ARRAY[@]}-1]
|
||||
}
|
||||
|
||||
function nuxfs.dir.push {
|
||||
local value="$1"
|
||||
DIR_ARRAY[${#DIR_ARRAY[@]}]="$value"
|
||||
}
|
||||
|
||||
function nuxfs.file.exists {
|
||||
test -e "$1" -o -h "$1";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue