From 00c9868ebd77b2f5917f286f59476e84bd3bcc35 Mon Sep 17 00:00:00 2001 From: dig Date: Sat, 2 Mar 2019 21:25:53 +0100 Subject: [PATCH] Update README for installer --- shtpl/README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/shtpl/README.md b/shtpl/README.md index 23f758f..daaae6c 100644 --- a/shtpl/README.md +++ b/shtpl/README.md @@ -1,11 +1,19 @@ # shtpl -> sh templating +> bash templating ## Install -Put the `shtpl` script somewhere meant for executable scripts like `~/bin/shtpl`. +Clone or download this repository: + +`git clone $p2git/dig/bash-utils.git` + +Put the `shtpl` script somewhere meant for executable scripts like `/usr/local/bin/shtpl`. Make it executable: `chmod +x shtpl`. +or let the installer do it for you :) +`bash-utils/shtpl/install` + + ## Usage Create a template file to be executed with shtpl: @@ -14,7 +22,7 @@ Create a template file to be executed with shtpl: nano someTpl.shtpl ``` ``` -#!/path/to/shtpl +#!/usr/bin/env shtpl Hello $WHO ! ``` @@ -51,7 +59,7 @@ WHO=Doctor ./someTpl.shtpl > doctorGreetings.txt shtpl uses a hack to turn you file into a call of `echo ""`, so it is simple, all what your system is able to understand as substitution is valid ! ``` -#!/path/to/shtpl +#!/usr/bin/env shtpl Simple variable: $ENV_VAR , and with brackets: ${TOTO}cm² Sub commands: $(echo ok) @@ -85,4 +93,4 @@ Prompt user input in place: your input Loops: [0][1][2][3][4][5][6][7][8][9][10] Call sub templates: what the template returns with "aze" -``` \ No newline at end of file +```