Przeglądaj źródła

test, scripts: use /usr/bin/env to find bash

use /usr/bin/env to find bash

add set -e back into scripts it was removed from
Jeff Zellner 10 lat temu
rodzic
commit
1239e1ce6f
5 zmienionych plików z 9 dodań i 6 usunięć
  1. 2 1
      cover
  2. 1 1
      scripts/build-aci
  3. 1 1
      scripts/build-docker
  4. 3 2
      scripts/genproto.sh
  5. 2 1
      test

+ 2 - 1
cover

@@ -1,8 +1,9 @@
-#!/bin/bash -e
+#!/usr/bin/env bash
 #
 # Generate coverage HTML for a package
 # e.g. PKG=./unit ./cover
 #
+set -e
 
 if [ -z "$PKG" ]; then
 	echo "cover only works with a single package, sorry"

+ 1 - 1
scripts/build-aci

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # A non-installed actool can be used, for example:
 # ACTOOL=../../appc/spec/bin/actool

+ 1 - 1
scripts/build-docker

@@ -1,4 +1,4 @@
-#!/usr/bin/bash
+#!/usr/bin/env bash
 tar cv --files-from /dev/null | docker import - scratch
 
 cat <<DF > Dockerfile

+ 3 - 2
scripts/genproto.sh

@@ -1,8 +1,9 @@
-#!/bin/bash -e
+#!/usr/bin/env bash
 #
 # Generate all etcd protobuf bindings.
 # Run from repository root.
 #
+set -e
 
 PREFIX="github.com/coreos/etcd/Godeps/_workspace/src"
 DIRS="./wal/walpb ./etcdserver/etcdserverpb ./snap/snappb ./raft/raftpb ./storage/storagepb"
@@ -27,7 +28,7 @@ popd
 export PATH="${GOBIN}:${PATH}"
 
 # copy all proto dependencies inside etcd to gopath
-for dir in ${DIRS}; do 
+for dir in ${DIRS}; do
 	mkdir -p ${GOPATH}/src/github.com/coreos/etcd/${dir}
 	pushd ${dir}
 		cp *.proto ${GOPATH}/src/github.com/coreos/etcd/${dir}

+ 2 - 1
test

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash
 #
 # Run all etcd tests
 # ./test
@@ -8,6 +8,7 @@
 #
 # PKG=./wal ./test
 # PKG=snap ./test
+set -e
 
 # Invoke ./cover for HTML output
 COVER=${COVER:-"-cover"}