From 1d3fd0b3c3d5334771a5fbc581442bc8bd197def Mon Sep 17 00:00:00 2001 From: Tony Tkacik Date: Wed, 21 Jun 2017 15:12:31 +0200 Subject: [PATCH] nuxfs: Added some doc details. Signed-off-by: Tony Tkacik --- bin/nuxfs | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/bin/nuxfs b/bin/nuxfs index 88eeb55..953dad1 100755 --- a/bin/nuxfs +++ b/bin/nuxfs @@ -26,13 +26,15 @@ ## ln -s github/nux-env/bashrc .bashrc ## +nux.use nux.dsl +nux.use nuxfs + + local WORKDIR=$(pwd) local TEMPLATE_DIR=$NUX_ENV_DIR/templates local SUFFIX=".nuxfs" local TEMPLATE_FILTER="*$SUFFIX" -nux.use nux.dsl -nux.use nuxfs GIT_BIN=$(which git) @@ -43,8 +45,8 @@ GIT_BIN=$(which git) ## Verifies that directories and files matches the specification ## in *.nuxfs* definition ### -### Check is non-descructive operation, whose only output is printing out -### information +### Check is non-descructive operation, whose only output is printing +### files violating nuxfs definition. task.check() { nuxfs.dsl.process "$@"; } @@ -57,15 +59,31 @@ task.describe() { ## Creates missing files as specified in *.nuxfs* definition. ## **DOES NOT MODIFY** existing files breaking specification. ## +### Keywords have following resolution: +### dir:: +### If directory does not exists, create it +### git:: +### If git repository does not exists, clone it +### link:: +### If symlink does not exists, create it +### cathegorize:: +### If cathegory directories does not exists, create them + task.apply() { nuxfs.dsl.process "$@"; } ## fix:: [] ## Performs apply and tries to fix warnings and errors and files as -## specified in nuxfs definition. This operation **DOES MODIFY** +## specified in nuxfs definition. This operation **DOES MODIFY** and may **DELETE** ## existing files. ## +### Keywords have similar resolution as an *apply* with following exceptions: +### cathegorize:: +### Matched files to cathegory directories +### should-not-exists:: +### Matched files are deleted +### task.fix() { nuxfs.dsl.process "$@"; }