Skip to content

Commit 144b9eb

Browse files
authored
Merge pull request #17 from guillaumevincent/master
Simplify bash_unit installation
2 parents 0bd2a08 + dee394f commit 144b9eb

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ before continuing reading this documentation.
2929

3030
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3131

32+
# Install
33+
34+
Simply download and run install.sh on your computer :
35+
36+
bash <(curl -s https://raw.githubusercontent.com/pgrange/bash_unit/master/install.sh)
37+
3238
# How to run tests
3339

3440
To run tests, simply call bash_unit with all your tests files as parameter. For instance to run bash_unit tests, from bash_unit directory:

install.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
echo "downloading bash_unit"
4+
current_working_dir=$PWD
5+
tarball_url=$(curl -s https://api.github.com/repos/pgrange/bash_unit/releases | grep tarball_url | head -n 1 | cut -d '"' -f 4)
6+
tmp_dir=`mktemp -d 2>/dev/null || mktemp -d -t 'tmpdir'`
7+
cd $tmp_dir
8+
curl -Ls $tarball_url | tar -xz
9+
find $tmp_dir -type f -name "bash_unit" | xargs cp -t $current_working_dir
10+
rm -rf $tmpdir
11+
echo "thank you for downloading bash_unit, you can now run ./bash_unit"

0 commit comments

Comments
 (0)