Skip to content
This repository has been archived by the owner on Mar 22, 2020. It is now read-only.

Commit

Permalink
Add install.sh and README update for install directions
Browse files Browse the repository at this point in the history
[skip ci]
***NO_CI***
  • Loading branch information
ethankhall committed Sep 28, 2018
1 parent 4327560 commit e1c0770
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Inc[luding] your configuration, one step at a time.

But these are only examples. `inc` is intended to be flexible enough for teams to describe what they need, to do. A common use-case is to put complicated build logic behind a single command so no new team member needs to remember this project's specific parameters.

## Install
You can grab the lastest releases from [Github](https://github.com/ethankhall/inc/releases). If you're lazy and just want to run a script do `bash <(curl -s https://raw.githubusercontent.com/ethankhall/inc/master/install.sh)

## What's Included?
While `inc` doesn't come with AA batteries, it comes with the the coin-cell to get you going. There are several commands that will come with `inc`. You're free to use one, some, all or none of them. The default commands are:
- checkout
Expand Down Expand Up @@ -80,4 +83,4 @@ This command is because I think it would be useful, not because it will be.

To integrate with `inc` at the command level, you just need to have an executable on the `PATH` and have it start with `inc-{command name}`.

More details on how this will work is coming.
More details on how this will work is coming.
18 changes: 18 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

echo "Downloading the lastest 'inc' and installing it in ~/bin"
mkdir ~/bin
wget $(curl https://api.github.com/repos/ethankhall/inc/releases/latest | jq -r '.assets[] | select(.name == "inc-mac") | .browser_download_url') -O ~/bin/inc.bck
mv ~/bin/inc.bck ~/bin/inc
chmod +x ~/bin/inc

WHERE_INC=`which inc`
if [ $? -eq 1 ]; then
echo "Looks like 'inc' didn't end up on your PATH. Please add \$HOME/bin to your PATH."
exit 1
fi

if [ "$WHERE_INC" != "$HOME/bin/inc" ]; then
echo "The recent copy of inc isn't first on your path, you may still be using an old version!"
exit 2
fi

0 comments on commit e1c0770

Please sign in to comment.