Browse Source

scripts: enforce genproto.sh is run from repo root

Jonathan Boulle 10 years ago
parent
commit
de0cb472be
1 changed files with 5 additions and 0 deletions
  1. 5 0
      scripts/genproto.sh

+ 5 - 0
scripts/genproto.sh

@@ -5,6 +5,11 @@
 #
 #
 set -e
 set -e
 
 
+if ! [[ "$0" =~ "scripts/genproto.sh" ]]; then
+	echo "must be run from repository root"
+	exit 255
+fi
+
 PREFIX="github.com/coreos/etcd/Godeps/_workspace/src"
 PREFIX="github.com/coreos/etcd/Godeps/_workspace/src"
 DIRS="./wal/walpb ./etcdserver/etcdserverpb ./snap/snappb ./raft/raftpb ./storage/storagepb"
 DIRS="./wal/walpb ./etcdserver/etcdserverpb ./snap/snappb ./raft/raftpb ./storage/storagepb"