From 7d50d2d252f6344cfb4d6e8b789070369fefe0f2 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 12 Nov 2018 22:54:37 +0100 Subject: [PATCH] rename commands : ins -> install, del -> delete, ser -> service, cnf -> set | readme add 'alias' command description --- README.md | 113 +++++++++++++--------- internal/buildfile/reader.go | 2 +- internal/buildfile/reader_test.go | 22 ++--- internal/cnf/parser/nginx/encoder_test.go | 21 ++-- internal/instruction/reader.go | 34 +++---- internal/instruction/{cnf.go => set.go} | 8 +- 6 files changed, 110 insertions(+), 90 deletions(-) rename internal/instruction/{cnf.go => set.go} (89%) diff --git a/README.md b/README.md index 8ebfa0d..690781f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ author: xdrm-brackets >Need to automate the setup of your linux server or desktop ? This tool is made for you. - [TOC] @@ -24,58 +23,72 @@ author: xdrm-brackets -### I. Build Format +### I. Commands Your whole setup remains in 1 only build file. Each line contains one instruction, the list of instructions is listed below. -#### 1) package management +#### 1) Comments + +Each line beginning with one of the following characters : `[`, `#` or `;` is considered a comment and is not interpreted. + + + +#### 2) package management These instructions allow you to interact with the package system available on your system. ``` -ins +install ``` Install the listed packages. If more than one, use spaces to separate package names. + + ``` -del +delete ``` Remove the listed packages. If more than one, use spaces to separate package names. -#### 3) update configuration files +#### 3) setup configuration -This instruction allow you to update configuration files without the need of an editor and in a developer-readable manner. +This instruction allow you to set fields of configuration files without the need of an editor and in a developer-readable manner. ``` -cnf +set ``` Update a configuration file where \ is a dot-separated human-readable [path expression](#ii-path-expressions) and \ is a string or a file. If a string is given, it will override/add the field ; if a file is given the configuration file will be replaced by it. -``` -cnf -``` -Remove a configuration field matching the \ path. - - #### 4) service management -These instructions allow you to interact with the service system (_cf. systemd_). +These instructions allow you to interact with the service system (_cf. [systemd](https://github.com/systemd/systemd)_). ``` -ser [enable|start|stop|restart|reload] +service [enable|start|stop|restart|reload] ``` Perform the action on services. If more than one, use spaces to separate service names. -#### 5) custom scripts +#### 5) aliases + +The file format allows you to create aliases to file paths for more readability in the [path expression](#ii-path-expressions) or with the [`run` command](#6-custom-scripts). + +``` +alias name /path/to.file +``` + +Create the alias `name` which resolves to the path `/path/to.file`. + + + +#### 6) custom scripts These instructions allow you to use custom scripts for complex operations. @@ -83,7 +96,7 @@ These instructions allow you to use custom scripts for complex operations. run