Sfoglia il codice sorgente

improved error messages from walking someone through the steps

tags/v1.1.0-rc1
Shivaram Lingamneni 5 anni fa
parent
commit
98ab3d14ee
1 ha cambiato i file con 13 aggiunte e 3 eliminazioni
  1. 13
    3
      install.sh

+ 13
- 3
install.sh Vedi File

3
 set -e
3
 set -e
4
 
4
 
5
 if [ -z "$GOPATH" ]; then
5
 if [ -z "$GOPATH" ]; then
6
-	echo \$GOPATH is unset: see https://golang.org/doc/code.html for details
6
+	echo Error: \$GOPATH is unset
7
+	echo See https://golang.org/doc/code.html for details, or try these steps:
8
+	echo -e "\tmkdir -p ~/go"
9
+	echo -e "\texport GOPATH=~/go"
7
 	exit 1
10
 	exit 1
8
 fi
11
 fi
9
 
12
 
10
 EXPECTED_DIR=${GOPATH}/src/github.com/oragono/oragono
13
 EXPECTED_DIR=${GOPATH}/src/github.com/oragono/oragono
11
 
14
 
12
-if [ `pwd` != "$EXPECTED_DIR" ] ; then
13
-	echo working checkout is not where \$GOPATH expects it: should be $EXPECTED_DIR
15
+if [ "$PWD" != "$EXPECTED_DIR" ] ; then
16
+	echo Error: working directory is not where \$GOPATH expects it to be
17
+	echo "Expected: $EXPECTED_DIR"
18
+	echo "Actual:   $PWD"
19
+	echo See https://golang.org/doc/code.html for details, or try these steps:
20
+	echo -e "\tmkdir -p ${GOPATH}/src/github.com/oragono"
21
+	echo -e "\tcd ${GOPATH}/src/github.com/oragono"
22
+	echo -e "\tmv $PWD oragono"
23
+	echo -e "\tcd oragono"
14
 	exit 1
24
 	exit 1
15
 fi
25
 fi
16
 
26
 

Loading…
Annulla
Salva