From 5883a1ae24b790e52bf86011f33924e78250564d Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 3 Aug 2017 15:43:05 -0700 Subject: [PATCH] Fix /bin/bash shebangs Summary: "/bin/bash" is a Linuxism. "/usr/bin/env bash" is portable. Closes https://github.com/facebook/rocksdb/pull/2646 Differential Revision: D5556259 Pulled By: ajkr fbshipit-source-id: cbffd38ecdbfffb2438969ec007ab345ed893ccb --- buckifier/rocks_test_runner.sh | 2 +- build_tools/cont_integration.sh | 2 +- build_tools/dockerbuild.sh | 2 +- build_tools/format-diff.sh | 2 +- build_tools/regression_build_test.sh | 2 +- build_tools/rocksdb-lego-determinator | 2 +- coverage/coverage_test.sh | 2 +- tools/benchmark.sh | 2 +- tools/benchmark_leveldb.sh | 2 +- tools/check_format_compatible.sh | 2 +- tools/dbench_monitor | 2 +- tools/generate_random_db.sh | 2 +- tools/pflag | 2 +- tools/rdb/rdb | 2 +- tools/regression_test.sh | 2 +- tools/run_flash_bench.sh | 2 +- tools/run_leveldb.sh | 2 +- tools/verify_random_db.sh | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/buckifier/rocks_test_runner.sh b/buckifier/rocks_test_runner.sh index 2ee216934..e1f48a760 100755 --- a/buckifier/rocks_test_runner.sh +++ b/buckifier/rocks_test_runner.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Create a tmp directory for the test to use TEST_DIR=$(mktemp -d /dev/shm/fbcode_rocksdb_XXXXXXX) TEST_TMPDIR="$TEST_DIR" $@ && rm -rf "$TEST_DIR" diff --git a/build_tools/cont_integration.sh b/build_tools/cont_integration.sh index 4e1905e7e..06f25c596 100755 --- a/build_tools/cont_integration.sh +++ b/build_tools/cont_integration.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2016, Facebook. All rights reserved. # diff --git a/build_tools/dockerbuild.sh b/build_tools/dockerbuild.sh index 2685380bf..02f609442 100755 --- a/build_tools/dockerbuild.sh +++ b/build_tools/dockerbuild.sh @@ -1,2 +1,2 @@ -#!/bin/bash +#!/usr/bin/env bash docker run -v $PWD:/rocks -w /rocks buildpack-deps make diff --git a/build_tools/format-diff.sh b/build_tools/format-diff.sh index 868452a92..81221ed9a 100755 --- a/build_tools/format-diff.sh +++ b/build_tools/format-diff.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # If clang_format_diff.py command is not specfied, we assume we are able to # access directly without any path. if [ -z $CLANG_FORMAT_DIFF ] diff --git a/build_tools/regression_build_test.sh b/build_tools/regression_build_test.sh index 765898821..698063328 100755 --- a/build_tools/regression_build_test.sh +++ b/build_tools/regression_build_test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/build_tools/rocksdb-lego-determinator b/build_tools/rocksdb-lego-determinator index 09e79f376..300a60aab 100755 --- a/build_tools/rocksdb-lego-determinator +++ b/build_tools/rocksdb-lego-determinator @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script is executed by Sandcastle # to determine next steps to run diff --git a/coverage/coverage_test.sh b/coverage/coverage_test.sh index 4d8052c9e..6d87ae908 100755 --- a/coverage/coverage_test.sh +++ b/coverage/coverage_test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Exit on error. set -e diff --git a/tools/benchmark.sh b/tools/benchmark.sh index 46e1c6567..1a2c38439 100755 --- a/tools/benchmark.sh +++ b/tools/benchmark.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # REQUIRE: db_bench binary exists in the current directory if [ $# -ne 1 ]; then diff --git a/tools/benchmark_leveldb.sh b/tools/benchmark_leveldb.sh index dce66d47a..776996980 100755 --- a/tools/benchmark_leveldb.sh +++ b/tools/benchmark_leveldb.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # REQUIRE: db_bench binary exists in the current directory # # This should be used with the LevelDB fork listed here to use additional test options. diff --git a/tools/check_format_compatible.sh b/tools/check_format_compatible.sh index 2f3805e5a..801648963 100755 --- a/tools/check_format_compatible.sh +++ b/tools/check_format_compatible.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # A shell script to load some pre generated data file to a DB using ldb tool # ./ldb needs to be avaible to be executed. diff --git a/tools/dbench_monitor b/tools/dbench_monitor index 10726dc23..d85f9d070 100755 --- a/tools/dbench_monitor +++ b/tools/dbench_monitor @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # #(c) 2004-present, Facebook Inc. All rights reserved. # diff --git a/tools/generate_random_db.sh b/tools/generate_random_db.sh index 28bdceb2b..e10843bab 100755 --- a/tools/generate_random_db.sh +++ b/tools/generate_random_db.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # A shell script to load some pre generated data file to a DB using ldb tool # ./ldb needs to be avaible to be executed. diff --git a/tools/pflag b/tools/pflag index adfac23bc..f3394a666 100755 --- a/tools/pflag +++ b/tools/pflag @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # #(c) 2004-present, Facebook, all rights reserved. # See the LICENSE file for usage and distribution rights. diff --git a/tools/rdb/rdb b/tools/rdb/rdb index 82cd17fb7..05da1158b 100755 --- a/tools/rdb/rdb +++ b/tools/rdb/rdb @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash node -e "RDB = require('./build/Release/rdb').DBWrapper; console.log('Loaded rocksdb in variable RDB'); repl = require('repl').start('> ');" diff --git a/tools/regression_test.sh b/tools/regression_test.sh index 7801da14f..58558bbe4 100755 --- a/tools/regression_test.sh +++ b/tools/regression_test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # The RocksDB regression test script. # REQUIREMENT: must be able to run make db_bench in the current directory # diff --git a/tools/run_flash_bench.sh b/tools/run_flash_bench.sh index 76c16bb59..4d9d0d557 100755 --- a/tools/run_flash_bench.sh +++ b/tools/run_flash_bench.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # REQUIRE: benchmark.sh exists in the current directory # After execution of this script, log files are generated in $output_dir. # report.txt provides a high level statistics diff --git a/tools/run_leveldb.sh b/tools/run_leveldb.sh index 884312e3d..de628c310 100755 --- a/tools/run_leveldb.sh +++ b/tools/run_leveldb.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # REQUIRE: benchmark_leveldb.sh exists in the current directory # After execution of this script, log files are generated in $output_dir. # report.txt provides a high level statistics diff --git a/tools/verify_random_db.sh b/tools/verify_random_db.sh index 8ff6a3fd1..7000f5a1a 100755 --- a/tools/verify_random_db.sh +++ b/tools/verify_random_db.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # A shell script to verify DB generated by generate_random_db.sh cannot opened and read correct data. # ./ldb needs to be avaible to be executed.