-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Welcome to Bash! | ||
|
||
Unlike many other languages here, bash is a bit of a special snowflake. | ||
If you are on a Mac or other unix-y platform, you almost definitely | ||
already have bash. In fact, anything you type into the terminal is | ||
likely going through bash. | ||
|
||
The downside to this is that there isn't much of a development | ||
ecosystem around bash like there is for other languages, and there are | ||
multiple verions of bash that can be frustratingly incompatible. Luckily | ||
we shouldn't hit those differences for these basic examples, and if you | ||
can get the tests to pass on your machine, we are doing great. | ||
|
||
## Installation | ||
|
||
As I said above, if you are on a unix-like OS (Mac OS X, Linux, Solaris, | ||
etc), you probably already have bash. | ||
|
||
## Testing | ||
|
||
As there isn't much of a bash ecosystem, there also isn't really a de | ||
facto leader in the bash testing area. For these examples we are using | ||
[bats](https://github.com/sstephenson/bats). You should be able to | ||
install it from your favorite package manager, on OS X with homebrew | ||
this would look something like this: | ||
|
||
``` | ||
$ brew install bats | ||
==> Downloading | ||
https://github.com/sstephenson/bats/archive/v0.4.0.tar.gz | ||
==> Downloading from | ||
https://codeload.github.com/sstephenson/bats/tar.gz/v0.4.0 | ||
######################################################################## | ||
100.0% | ||
==> ./install.sh /opt/boxen/homebrew/Cellar/bats/0.4.0 | ||
🍺 /opt/boxen/homebrew/Cellar/bats/0.4.0: 10 files, 60K, built in 2 | ||
seconds | ||
``` | ||
|
||
Run the tests with `bats whatever_test.sh`. |