-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.env
33 lines (26 loc) · 1.1 KB
/
dev.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# base project configuration
# --------------------------------------------------------------------
export GOPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# prereqs - warn people if stuff isn't installed
# --------------------------------------------------------------------
which curl > /dev/null || echo "error: `curl` not found. Is it installed?"
which git > /dev/null || echo "error: `git` not found. Is it installed?"
which go > /dev/null || echo "error: `go` not found. Is it installed?"
# utility functions
# --------------------------------------------------------------------
function safePrefixPATH {
# conditionally update the PATH environment variable - don't
# update PATH if it already contains the path being passed in.
if [[ ! ":$PATH:" == *":$1:"* ]]; then
export PATH=$1:$PATH;
fi
}
# long tail project configuration
# --------------------------------------------------------------------
if [ "$1" != "fast" ]
then
safePrefixPATH $GOPATH/bin
go get github.com/levicook/glitch
go get github.com/russross/blackfriday-tool
fi