3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-26 22:09:24 +01:00

improved error messages from walking someone through the steps

This commit is contained in:
Shivaram Lingamneni 2019-02-21 16:20:03 -05:00
parent 4af56f2dae
commit 98ab3d14ee

View File

@ -3,14 +3,24 @@
set -e set -e
if [ -z "$GOPATH" ]; then if [ -z "$GOPATH" ]; then
echo \$GOPATH is unset: see https://golang.org/doc/code.html for details echo Error: \$GOPATH is unset
echo See https://golang.org/doc/code.html for details, or try these steps:
echo -e "\tmkdir -p ~/go"
echo -e "\texport GOPATH=~/go"
exit 1 exit 1
fi fi
EXPECTED_DIR=${GOPATH}/src/github.com/oragono/oragono EXPECTED_DIR=${GOPATH}/src/github.com/oragono/oragono
if [ `pwd` != "$EXPECTED_DIR" ] ; then if [ "$PWD" != "$EXPECTED_DIR" ] ; then
echo working checkout is not where \$GOPATH expects it: should be $EXPECTED_DIR echo Error: working directory is not where \$GOPATH expects it to be
echo "Expected: $EXPECTED_DIR"
echo "Actual: $PWD"
echo See https://golang.org/doc/code.html for details, or try these steps:
echo -e "\tmkdir -p ${GOPATH}/src/github.com/oragono"
echo -e "\tcd ${GOPATH}/src/github.com/oragono"
echo -e "\tmv $PWD oragono"
echo -e "\tcd oragono"
exit 1 exit 1
fi fi