Przeglądaj źródła

improved error messages from walking someone through the steps

tags/v1.1.0-rc1
Shivaram Lingamneni 5 lat temu
rodzic
commit
98ab3d14ee
1 zmienionych plików z 13 dodań i 3 usunięć
  1. 13
    3
      install.sh

+ 13
- 3
install.sh Wyświetl plik

@@ -3,14 +3,24 @@
3 3
 set -e
4 4
 
5 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 10
 	exit 1
8 11
 fi
9 12
 
10 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 24
 	exit 1
15 25
 fi
16 26
 

Ładowanie…
Anuluj
Zapisz