@@ -206,12 +206,29 @@ If you do not see this, follow the instructions in the [Installing
206206Bash] ( #installing-bash ) section later in this document.
207207
208208__ Note: While Bash is required to run this framework, your individual command
209- scripts can be in any other interpreted language.__
209+ scripts can be in any other interpreted language installed on the host system .__
210210
211211### How to use this framework
212212
213213First you'll need a copy of this framework available in your project sources.
214- Archives are available at:
214+ The most expedient way to bootstrap your program is to use the [ ` go-template `
215+ file] ( https://github.com/mbland/go-script-bash/blob/master/go-template ) as a
216+ starting point (replacing ` curl ` with ` wget ` , ` fetch ` , or whichever tool you
217+ prefer):
218+
219+ ``` bash
220+ $ curl https://raw.githubusercontent.com/mbland/go-script-bash/master/go-template > ./go
221+ $ chmod ugo+rx ./go
222+ ```
223+
224+ You may rename this file whatever you wish (i.e. it doesn't have to be named
225+ ` ./go ` ), update its documentation and variables to fit your project, and check
226+ it into your project repository. See the ` go-template ` comments for details.
227+
228+ If you'd prefer to download a copy of the framework and check it into your
229+ sources, versioned archives are available from the [ go-script-bash Releases
230+ page] ( https://github.com/mbland/go-script-bash/releases ) . The archives for the
231+ current release are:
215232
216233- https://github.com/mbland/go-script-bash/archive/v1.3.0.tar.gz
217234- https://github.com/mbland/go-script-bash/archive/v1.3.0.zip
@@ -228,21 +245,24 @@ $ git submodule update --init
228245where ` <target-dir> ` is any point inside your project directory structure that
229246you prefer.
230247
231- Then create a bash script in the root directory of your project to act as the
232- main ` ./go ` script. This script need not be named ` go ` , but it must contain the
233- following as the first and last executable lines, respectively:
248+ If you're not using ` go-template ` , create a bash script in the root directory of
249+ your project to act as the main ` ./go ` script. This script need not be named
250+ ` go ` , but it must contain the following lines, with ` @go "$@" ` as the last line
251+ of the script:
234252
235253``` bash
236254. " ${0%/* } /go-core.bash" " scripts"
237255@go " $@ "
238256```
239257
240258where:
241- - ` "${0%/*}" ` produces the path to the project's root directory
242- - ` go-core.bash ` is the path to the file of the same name imported from this
243- repository
259+ - ` ${0%/*} ` produces the path to the project's root directory based on the path
260+ to the ` ./go ` script
261+ - ` ${0%/*}/go-core.bash ` produces the path to the framework's ` go-core.bash `
262+ file within your project's copy of the framework (adjusted to reflect where
263+ your copy of ` go-script-bash ` actually resides)
244264- ` scripts ` is the path to the directory holding your project's command scripts
245- relative to the project root
265+ relative to the project root (it can be any name you like)
246266
247267#### Directory structure
248268
@@ -489,8 +509,8 @@ need the following utilities installed:
489509- ` tput ` (ncurses) on Linux, OS X, UNIX
490510- ` mode.com ` should be present on Windows
491511
492- To use the ` get ` builtin, the ` curl ` , ` wget ` , and ` git ` programs must be
493- installed on your system.
512+ To use the ` get file ` builtin, either ` curl ` , ` wget ` , or ` fetch ` must be
513+ installed on your system. ` get git-repo ` requires ` git ` , naturally.
494514
495515### Open Source License
496516
0 commit comments