From 3d1569f72ce254d7bc40c3dc7f6d68c3b26e193f Mon Sep 17 00:00:00 2001 From: sreedharbukya Date: Fri, 13 Feb 2015 01:29:14 +0530 Subject: [PATCH 1/2] SB: edited tutorial to explain boilerplate code --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 05a7e99..a64c4f6 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,8 @@ _program_entrypoint='overdrive' . "$_program_libPath"/shellfire/core/init.functions "$@" ``` +(Boilerplate code will enable program to load libraries and other dependency code , which makes this script standalone) + Now run it with `./overdrive` - you should see `Hello World`. Try `./overdrive --help` and `./overdrive --version`. Of course, this isn't a very useful program. Let's at least give it a purpose. ## Parsing the command line From 7f70376bb5d5daff9ebb80adef813a2a8a1d4416 Mon Sep 17 00:00:00 2001 From: sreedharbukya Date: Fri, 13 Feb 2015 01:32:12 +0530 Subject: [PATCH 2/2] SB: minor change in readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a64c4f6..9166cba 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ _program() } } +# boilerplate code -- > starts here + _program_name='overdrive' _program_version='unversioned' _program_package_or_build='' @@ -84,12 +86,14 @@ _program_etcPath="${_program_path}/etc" _program_varPath="${_program_path}/var" _program_entrypoint='overdrive' +# < -- ends here # Assumes pwd, and so requires this code to be running from this folder . "$_program_libPath"/shellfire/core/init.functions "$@" ``` -(Boilerplate code will enable program to load libraries and other dependency code , which makes this script standalone) +Boilerplate code will enable program to load libraries and other dependency code , which makes this script standalone + Now run it with `./overdrive` - you should see `Hello World`. Try `./overdrive --help` and `./overdrive --version`. Of course, this isn't a very useful program. Let's at least give it a purpose.