1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

Replaced - with . in nuxfs

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2016-11-11 20:01:34 +01:00
parent 531f55f249
commit 135eabc57c
2 changed files with 12 additions and 12 deletions

View file

@ -10,7 +10,7 @@ nux.include nuxfs.dsl
## verify - Verifies that directory matches nuxfs specification
function task.verify {
link-exists() {
link.exists() {
nux.log debug "Testing '$1' as link"
if test ! -h "$1"; then
nuxfs.error "$1" "is not symlink."
@ -26,26 +26,26 @@ function task.verify {
nuxfs.warning "$1" "target '$NC_White$2$NC_No' does not exists."
fi
}
def-notexists() {
def.notexists() {
nuxfs.error "$1" "does not exists".
}
nuxfs.dsl.execute .nuxfs
}
## create - Creates missing files as described in nuxfs definition.
## create - Creates missing files as described in nuxfs definition.
function task.create {
directory-notexists() {
directory.notexists() {
nuxfs.info "$1" "Created directory";
mkdir -p "$1"
}
link-notexists() {
link.notexists() {
nuxfs.info "$1" "Creating link to '$2'";
ln -s "$2" "$1"
}
git-notexists() {
git.notexists() {
log.warning "Not implemented";
}

View file

@ -25,17 +25,17 @@ function nuxfs.dsl.command {
nux.log debug Processing $CMD "$localFile" $@;
exec.if.function $CMD-pre "$localFile" "$@";
exec.if.function $CMD.pre "$localFile" "$@";
nux.log debug Working file: $NC_White$localFile;
if nuxfs.file.exists "$localFile"; then
nux.log debug "File $localFile exits";
exec.if.function $CMD-exists def-exists "$localFile" "$@";
exec.if.function $CMD.exists def.exists "$localFile" "$@";
else
nux.log debug "File $localFile does not exists";
exec.if.function $CMD-notexists def-notexists "$localFile" "$@";
exec.if.function $CMD.notexists def.notexists "$localFile" "$@";
fi
exec.if.function $CMD-post def-post "$localFile" "$@";
exec.if.function $CMD.post def.post "$localFile" "$@";
}
@ -61,12 +61,12 @@ function nuxfs.dsl.keywords {
#echo git clone $1 $2;
}
directory-post() {
directory.post() {
nuxfs.dir.push "$1"
nux.log debug "Adding to dir stack: $1"
}
directory-exists() {
directory.exists() {
if test -d "$1"; then
nux.log debug "Directory exists '$1'"
else