소스 검색

improved error messages from walking someone through the steps

tags/v1.1.0-rc1
Shivaram Lingamneni 5 년 전
부모
커밋
98ab3d14ee
1개의 변경된 파일13개의 추가작업 그리고 3개의 파일을 삭제
  1. 13
    3
      install.sh

+ 13
- 3
install.sh 파일 보기

@@ -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
 

Loading…
취소
저장