Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add Carton installer.

  • Loading branch information...
commit 0272e1951a04d0bbdcf43d4ee0e8aefcf0d644de 1 parent 6e83b56
Johan Andersson authored
Showing with 25 additions and 3 deletions.
  1. +9 −3 README.md
  2. +16 −0 go
View
12 README.md
@@ -9,12 +9,18 @@ package development.
## Installation
-Clone this repository on your computer and add the `bin` directory to
-your `PATH`.
+To automatically install Carton, run this command:
+
+ curl -fsSkL https://raw.github.com/rejeep/carton/master/go | sh
+
+You can also clone the repository.
- $ cd /path/to/code
$ git clone https://github.com/rejeep/carton.git
+
+Don't forget to add Carton's bin to your `PATH`.
+
$ export PATH="/path/to/code/carton/bin:$PATH"
+
## Usage
View
16 go
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+CARTON_DIR="$HOME/.carton"
+
+if [[ -d $CARTON_DIR ]]; then
+ echo "Carton is already installed at '$CARTON_DIR'"
+
+ exit 1
+else
+ git clone https://github.com/rejeep/carton.git $CARTON_DIR &> /dev/null
+
+ echo "Successfully installed Carton! Now, add the carton binary to your PATH."
+ echo ' export PATH="'${CARTON_DIR}'/bin:$PATH"'
+
+ exit 0
+fi
Please sign in to comment.
Something went wrong with that request. Please try again.