From d1cbb90daa1ea788496001e119597cffcd301a06 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 25 Sep 2017 17:20:40 -0600 Subject: [PATCH] scripts: fix bash path in shebangs (part 2) /bin/bash is a Linuxism. Other operating systems install bash to different paths. Use /usr/bin/env in shebangs to find bash. Signed-off-by: Alan Somers --- bin/git-archive-all.sh | 2 +- qa/standalone/scrub/osd-recovery-scrub.sh | 2 +- src/test/osd/safe-to-destroy.sh | 2 +- src/test/rbd-ggate.sh | 3 ++- src/test/smoke.sh | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/git-archive-all.sh b/bin/git-archive-all.sh index 8c292b54d5228..513b50a2c4911 100755 --- a/bin/git-archive-all.sh +++ b/bin/git-archive-all.sh @@ -1,4 +1,4 @@ -#!/bin/bash - +#!/usr/bin/env bash # # File: git-archive-all.sh # diff --git a/qa/standalone/scrub/osd-recovery-scrub.sh b/qa/standalone/scrub/osd-recovery-scrub.sh index ef9a3318afd8f..670ea1c328d87 100755 --- a/qa/standalone/scrub/osd-recovery-scrub.sh +++ b/qa/standalone/scrub/osd-recovery-scrub.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash # # Copyright (C) 2017 Red Hat # diff --git a/src/test/osd/safe-to-destroy.sh b/src/test/osd/safe-to-destroy.sh index ab12dcdfba438..f03a235f7dda3 100755 --- a/src/test/osd/safe-to-destroy.sh +++ b/src/test/osd/safe-to-destroy.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source $CEPH_ROOT/qa/standalone/ceph-helpers.sh diff --git a/src/test/rbd-ggate.sh b/src/test/rbd-ggate.sh index 397a9ae1c7094..da1217e10abcf 100755 --- a/src/test/rbd-ggate.sh +++ b/src/test/rbd-ggate.sh @@ -1,4 +1,4 @@ -#!/bin/bash -ex +#!/usr/bin/env bash # # Copyright (C) 2014, 2015 Red Hat # Copyright (C) 2013 Cloudwatt @@ -15,6 +15,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library Public License for more details. # +set -ex source $(dirname $0)/detect-build-env-vars.sh test `uname` = FreeBSD diff --git a/src/test/smoke.sh b/src/test/smoke.sh index 297bbc7d67661..1c79416cbd91c 100755 --- a/src/test/smoke.sh +++ b/src/test/smoke.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source $CEPH_ROOT/qa/standalone/ceph-helpers.sh