forked from tshprecher/gospell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·33 lines (28 loc) · 1.06 KB
/
install.sh
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/sh
#
# This basic install.sh was written in the hopes that will be useful
# and reusable to those developing Go programs, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License v2 as published by the Free Software Foundation.
#
# Copyright (C) 2016 Nicholas D Steeves <[email protected]>
#
export GOPATH="$HOME/go"
export PACKAGE="github.com/tshprecher/gospell"
command -v go >/dev/null || { echo "command 'go' not found."; exit 1; }
echo "Creating required dirs"
mkdir -p "$GOPATH"/src/`dirname "$PACKAGE"`
ln -s "$PWD" "$GOPATH"/src/"$PACKAGE"
mkdir "$GOPATH"/bin
mkdir "$GOPATH"/pkg
echo "Installing `basename $PACKAGE`"
go install $PACKAGE
echo "Your PATH is currently: $PATH"
echo "You may need to add $GOPATH/bin to it, like so:"
echo "PATH=\$PATH:$GOPATH/bin"
echo
echo "See $GOPATH/src/$PACKAGE/README for more info"