diff --git a/.gitignore b/.gitignore index 4eee896..cec7f1f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ website/faq.md website/.jekyll-metadata env.sh + +website/main.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index a7fac6a..4d6bfbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Released: Unreleased. [Commit log](https://github.com/kvz/bash3boilerplate/compare/v2.0.0...master) +- Offer the main template for download as http://bash3boilerplate.sh/main.sh - Better OS detection (#38, thx @moviuro) - Improve README copy (#34, thx galaktos) - Fix unquoted variable access within (#34 thx galaktos) diff --git a/FAQ.md b/FAQ.md index 04535c4..c533b33 100644 --- a/FAQ.md +++ b/FAQ.md @@ -23,17 +23,17 @@ A 'cli' is a [command-line interface](https://en.wikipedia.org/wiki/Command-line ## How do I incorporate BASH3 Boilerplate into my own project? You can incorporate BASH3 Boilerplate into your project one of three ways: -1. Copy the desired portions of [main.sh](./main.sh) into your own script. -1. Download [main.sh](./main.sh) and start pressing the delete-key for unwanted things +1. Copy the desired portions of [main.sh](https://github.com/kvz/bash3boilerplate/blob/master/main.sh) into your own script. +1. Download [main.sh](https://github.com/kvz/bash3boilerplate/blob/master/main.sh) and start pressing the delete-key for unwanted things Once the `main.sh` has been tailor-made for your project you could either append your own script in the same file, or source it: -1. Copy [main.sh](./main.sh) into the same directory as your script and then edit and embed it into your script using bash's dot (`.`) include feature, e.g. +1. Copy [main.sh](https://github.com/kvz/bash3boilerplate/blob/master/main.sh) into the same directory as your script and then edit and embed it into your script using bash's dot (`.`) include feature, e.g. ```bash #!/usr/bin/env bash . main.sh ``` -1. Source [main.sh](./main.sh) in your script or at the command line +1. Source [main.sh](https://github.com/kvz/bash3boilerplate/blob/master/main.sh) in your script or at the command line ```bash #!/usr/bin/env bash . main.sh diff --git a/README.md b/README.md index 32e2409..ee65d59 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ they are reusable as-is in most scripts. ## Goals -Delete-Key-**Friendly**. We propose using [`main.sh`](https://github.com/kvz/bash3boilerplate/blob/master/main.sh) +Delete-Key-**Friendly**. We propose using [`main.sh`](http://bash3boilerplate.sh/main.sh) as a base and removing the parts you don't need, rather than introducing packages, includes, compilers, etc. This may feel a bit archaic at first, but that is exactly the strength of Bash scripts that we want to embrace. @@ -65,7 +65,7 @@ There are 3 different ways you can install b3bp: Use curl or wget to download the source, save as your script, and start deleting the unwanted bits, and adding your own logic. ```bash -wget https://raw.githubusercontent.com/kvz/bash3boilerplate/master/main.sh +wget http://bash3boilerplate.sh/main.sh vim main.sh ``` diff --git a/website/_bin/inject.sh b/website/_bin/inject.sh index 11ec962..bda06b6 100755 --- a/website/_bin/inject.sh +++ b/website/_bin/inject.sh @@ -32,6 +32,8 @@ if [[ "${OSTYPE:-}" == "darwin"* ]]; then __os="OSX" fi +# Offer the main template for download as http://bash3boilerplate.sh/main.sh +cp -v main.sh website/ for doc in "README" "FAQ" "CHANGELOG"; do targetName="$(echo "${doc}" | awk '{print tolower($0)}')"