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

nuxfs: Small fixes.

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2017-06-10 22:42:31 +02:00
parent 5d69659e3c
commit 7479fb53f8
6 changed files with 108 additions and 32 deletions

View file

@ -1,3 +1,5 @@
#/bin/sh
.block dir name
.keyword link name target
.keyword git name origin
@ -5,6 +7,7 @@
.keyword name name
.keyword template
.keyword exists
.keyword should-not-exists
directory() {
dir
@ -25,8 +28,22 @@ sdir() {
nux.check.file.exists "$abs_path"
}
should-not-exists.check() {
nux.log trace "Checking existence of $NC_White$abs_path$NC_No"
if nux.check.file.exists "$abs_path"; then
return 1
fi
return 0
}
should-not-exists.check.failed() {
for f in "$rel_path"; do
nux.dsl.error $f Should not exists, but is present.
done
}
.check.failed() {
nux.dsl.error "$abs_path" does not exists.
nux.dsl.error "$rel_path" does not exists.
}
dir.entered() {
if nux.check.file.exists "$abs_path/.nuxfs"; then