Offer the main template for download as http://bash3boilerplate.sh/main.sh

This commit is contained in:
Kevin van Zonneveld 2016-06-24 11:47:28 +02:00
parent 03a2ec5adf
commit 8bbba18f7e
5 changed files with 11 additions and 6 deletions

2
.gitignore vendored
View File

@ -14,3 +14,5 @@ website/faq.md
website/.jekyll-metadata
env.sh
website/main.sh

View File

@ -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)

8
FAQ.md
View File

@ -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

View File

@ -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
```

View File

@ -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)}')"