diff --git a/buckifier/rocks_test_runner.sh b/buckifier/rocks_test_runner.sh index 2ee216934d..e1f48a760d 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 4e1905e7e3..06f25c596e 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 2685380bf1..02f6094428 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 868452a92a..81221ed9a4 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 7658988210..6980633287 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 09e79f376a..300a60aab9 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 4d8052c9e4..6d87ae9086 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 46e1c6567d..1a2c38439c 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 dce66d47ad..7769969809 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 2f3805e5ab..801648963e 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 10726dc232..d85f9d070c 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 28bdceb2ba..e10843bab8 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 adfac23bc9..f3394a6664 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 82cd17fb7e..05da1158b8 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 7801da14f0..58558bbe4a 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 76c16bb595..4d9d0d5575 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 884312e3db..de628c310c 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 8ff6a3fd18..7000f5a1aa 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.