From 422fd6057e477ac2249f665ca77553dac8ec671b Mon Sep 17 00:00:00 2001 From: Markus Pfeiffer Date: Thu, 13 Jun 2019 18:42:43 +0100 Subject: [PATCH] Fix shebangs in scripts so that they work on non-linuxey systems (#9254) --- scripts/analyzeNetworkSocketUsage.sh | 2 +- scripts/build-bundle.sh | 2 +- scripts/build-dbg-deb.sh | 2 +- scripts/build-deb.sh | 2 +- scripts/build-docker.sh | 2 +- scripts/build-nsis.sh | 2 +- scripts/build-rpm.sh | 2 +- scripts/build-snap.sh | 2 +- scripts/build-xc-deb.sh | 2 +- scripts/build-xc64-deb.sh | 2 +- scripts/buildCompletionsBash.sh | 2 +- scripts/buildCompletionsFish.sh | 2 +- scripts/cluster-run-common.sh | 2 +- scripts/dumpAgency.sh | 2 +- scripts/encryptionTest.sh | 2 +- scripts/generateDocumentation.sh | 2 +- scripts/generateMaintenanceTestData.sh | 2 +- scripts/killLocalCluster.sh | 2 +- scripts/limitMemory.sh | 2 +- scripts/quickieTest.sh | 2 +- scripts/setupPerfEvents.sh | 2 +- scripts/setupPerfEvents_onlyCriticalWrite.sh | 2 +- scripts/shutdownLocalCluster.sh | 2 +- scripts/startArangoDBClusterLocal.sh | 2 +- scripts/startLeaderFollower.sh | 2 +- scripts/startLocalCluster.sh | 2 +- scripts/startLocalDockerCluster.sh | 2 +- scripts/startStandAloneAgency.sh | 2 +- scripts/tmux_starter | 2 +- scripts/unittest | 2 +- scripts/unpackInspectorReport.sh | 2 +- utils/cppcheck.sh | 2 +- utils/generateExamples.sh | 2 +- utils/generateREADME.sh | 2 +- utils/generateSwagger.sh | 2 +- utils/gitjslint.sh | 2 +- utils/manPages.sh | 2 +- utils/reformat.sh | 2 +- utils/replace_string.sh | 2 +- 39 files changed, 39 insertions(+), 39 deletions(-) diff --git a/scripts/analyzeNetworkSocketUsage.sh b/scripts/analyzeNetworkSocketUsage.sh index f9502e6a58..a3a240c45b 100755 --- a/scripts/analyzeNetworkSocketUsage.sh +++ b/scripts/analyzeNetworkSocketUsage.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # we first count open sockets in total on the system: echo "open sockets: " F="/tmp/$$_netstat.log" diff --git a/scripts/build-bundle.sh b/scripts/build-bundle.sh index fe303937be..c3d7f198e1 100755 --- a/scripts/build-bundle.sh +++ b/scripts/build-bundle.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/scripts/build-dbg-deb.sh b/scripts/build-dbg-deb.sh index b66178d2a4..ea8dfd72c7 100755 --- a/scripts/build-dbg-deb.sh +++ b/scripts/build-dbg-deb.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # To install the build libraries needed by this script run: # `sudo apt-get install cmake libjemalloc-dev libssl-dev libreadline-dev` # After the packages are built you will find them in /var/tmp diff --git a/scripts/build-deb.sh b/scripts/build-deb.sh index 8f715fff2b..4eb02b1dba 100755 --- a/scripts/build-deb.sh +++ b/scripts/build-deb.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # To install the build libraries needed by this script run: # `sudo apt-get install cmake libjemalloc-dev libssl-dev libreadline-dev` # After the packages are built you will find them in /var/tmp diff --git a/scripts/build-docker.sh b/scripts/build-docker.sh index 890105077c..66da0678f9 100755 --- a/scripts/build-docker.sh +++ b/scripts/build-docker.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/scripts/build-nsis.sh b/scripts/build-nsis.sh index ca0f1a3d24..b39b59bdee 100644 --- a/scripts/build-nsis.sh +++ b/scripts/build-nsis.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/scripts/build-rpm.sh b/scripts/build-rpm.sh index 10c73ad963..9d75a4e0db 100755 --- a/scripts/build-rpm.sh +++ b/scripts/build-rpm.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/scripts/build-snap.sh b/scripts/build-snap.sh index 4d6ca099ef..022dd80043 100755 --- a/scripts/build-snap.sh +++ b/scripts/build-snap.sh @@ -1,5 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/scripts/build-xc-deb.sh b/scripts/build-xc-deb.sh index ed6d757710..e0b8c9999b 100755 --- a/scripts/build-xc-deb.sh +++ b/scripts/build-xc-deb.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/scripts/build-xc64-deb.sh b/scripts/build-xc64-deb.sh index 037aa678da..6ab866412b 100755 --- a/scripts/build-xc64-deb.sh +++ b/scripts/build-xc64-deb.sh @@ -1,5 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/scripts/buildCompletionsBash.sh b/scripts/buildCompletionsBash.sh index 6003adf88b..f5abb4b60d 100755 --- a/scripts/buildCompletionsBash.sh +++ b/scripts/buildCompletionsBash.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$1" == "" ]]; then echo "usage $0 outfile" diff --git a/scripts/buildCompletionsFish.sh b/scripts/buildCompletionsFish.sh index 4e9b5f5898..d2285eb768 100755 --- a/scripts/buildCompletionsFish.sh +++ b/scripts/buildCompletionsFish.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$1" == "" ]]; then echo "usage $0 outfile" diff --git a/scripts/cluster-run-common.sh b/scripts/cluster-run-common.sh index 7dd6cf18e3..37f4c5f616 100644 --- a/scripts/cluster-run-common.sh +++ b/scripts/cluster-run-common.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function help() { echo "USAGE: $0 [options]" diff --git a/scripts/dumpAgency.sh b/scripts/dumpAgency.sh index 1e92cc3a87..ec0507a8c8 100755 --- a/scripts/dumpAgency.sh +++ b/scripts/dumpAgency.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ "$*" == "" ] ; then curl -Ls http://localhost:4001/_api/agency/read -d '[["/"]]' | jq . else diff --git a/scripts/encryptionTest.sh b/scripts/encryptionTest.sh index 06b8be8b7e..24577f825d 100755 --- a/scripts/encryptionTest.sh +++ b/scripts/encryptionTest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This script runs the go-driver tests against an ArangoDB enterprise # docker image that has encryption turned on. diff --git a/scripts/generateDocumentation.sh b/scripts/generateDocumentation.sh index 1dfa81ed13..bf45132746 100755 --- a/scripts/generateDocumentation.sh +++ b/scripts/generateDocumentation.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ##python-setuptools ## diff --git a/scripts/generateMaintenanceTestData.sh b/scripts/generateMaintenanceTestData.sh index ab7864e9a0..df2c004077 100755 --- a/scripts/generateMaintenanceTestData.sh +++ b/scripts/generateMaintenanceTestData.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Generate test data for maintenance unit tests # diff --git a/scripts/killLocalCluster.sh b/scripts/killLocalCluster.sh index e068809dd2..5580385829 100755 --- a/scripts/killLocalCluster.sh +++ b/scripts/killLocalCluster.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash killall arangod sleep 2 diff --git a/scripts/limitMemory.sh b/scripts/limitMemory.sh index bfc53dc91f..10eefbb715 100755 --- a/scripts/limitMemory.sh +++ b/scripts/limitMemory.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # limit memory useage for process # using control groups https://en.wikipedia.org/wiki/Cgroups diff --git a/scripts/quickieTest.sh b/scripts/quickieTest.sh index af56ae56a3..14f37d63f8 100755 --- a/scripts/quickieTest.sh +++ b/scripts/quickieTest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash JSLINTOUT=/tmp/jslintout.$$ trap "rm -rf ${JSLINTOUT}" EXIT diff --git a/scripts/setupPerfEvents.sh b/scripts/setupPerfEvents.sh index 70083b5efe..744cb4e0c3 100755 --- a/scripts/setupPerfEvents.sh +++ b/scripts/setupPerfEvents.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This requires the perf utility to be installed and the OS must be linux. # Compile with CMAKE_BUILD_TYPE=RelWithDebInfo in the subdirectory "build". diff --git a/scripts/setupPerfEvents_onlyCriticalWrite.sh b/scripts/setupPerfEvents_onlyCriticalWrite.sh index a3825e0493..19721ca3fa 100755 --- a/scripts/setupPerfEvents_onlyCriticalWrite.sh +++ b/scripts/setupPerfEvents_onlyCriticalWrite.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This requires the perf utility to be installed and the OS must be linux. # Compile with CMAKE_BUILD_TYPE=RelWithDebInfo in the subdirectory "build". diff --git a/scripts/shutdownLocalCluster.sh b/scripts/shutdownLocalCluster.sh index ee705bcb85..3c90f56a67 100755 --- a/scripts/shutdownLocalCluster.sh +++ b/scripts/shutdownLocalCluster.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash params=("$@") case $OSTYPE in diff --git a/scripts/startArangoDBClusterLocal.sh b/scripts/startArangoDBClusterLocal.sh index c60e1fa61e..702f693d33 100755 --- a/scripts/startArangoDBClusterLocal.sh +++ b/scripts/startArangoDBClusterLocal.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ -z "$XTERM" ] ; then XTERM=x-terminal-emulator fi diff --git a/scripts/startLeaderFollower.sh b/scripts/startLeaderFollower.sh index 10d7065680..63856d4783 100755 --- a/scripts/startLeaderFollower.sh +++ b/scripts/startLeaderFollower.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash params=("$@") rm -rf active diff --git a/scripts/startLocalCluster.sh b/scripts/startLocalCluster.sh index 2498e70669..2ec6c87fbd 100755 --- a/scripts/startLocalCluster.sh +++ b/scripts/startLocalCluster.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash params=("$@") rm -rf cluster diff --git a/scripts/startLocalDockerCluster.sh b/scripts/startLocalDockerCluster.sh index 3b566502b0..a337356562 100755 --- a/scripts/startLocalDockerCluster.sh +++ b/scripts/startLocalDockerCluster.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash DOCKERIMAGE=arangodb/arangodb:3.0.0-p4 if [ -z "$XTERM" ] ; then XTERM=x-terminal-emulator diff --git a/scripts/startStandAloneAgency.sh b/scripts/startStandAloneAgency.sh index 153e7cbe96..c739878fa7 100755 --- a/scripts/startStandAloneAgency.sh +++ b/scripts/startStandAloneAgency.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function help() { echo "USAGE: scripts/startStandAloneAgency.sh [options]" diff --git a/scripts/tmux_starter b/scripts/tmux_starter index a0ac5de689..eb87d67066 100755 --- a/scripts/tmux_starter +++ b/scripts/tmux_starter @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Author Jan Christoph Uhde main(){ diff --git a/scripts/unittest b/scripts/unittest index 1a0f6ab236..855cf43ffc 100755 --- a/scripts/unittest +++ b/scripts/unittest @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PID=$$ export GLIBCXX_FORCE_NEW=1 diff --git a/scripts/unpackInspectorReport.sh b/scripts/unpackInspectorReport.sh index 6fa851c512..0d1eed7524 100755 --- a/scripts/unpackInspectorReport.sh +++ b/scripts/unpackInspectorReport.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash filename=arango-inspector.json outdir=arango-inspector diff --git a/utils/cppcheck.sh b/utils/cppcheck.sh index 12a9c8c911..a46e7fe1d9 100755 --- a/utils/cppcheck.sh +++ b/utils/cppcheck.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash rm -f cppcheck.log cppcheck.tmp trap "rm -rf cppcheck.tmp" EXIT touch cppcheck.tmp diff --git a/utils/generateExamples.sh b/utils/generateExamples.sh index 4965d2052b..e98d77dd0f 100755 --- a/utils/generateExamples.sh +++ b/utils/generateExamples.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PID=$$ if test -n "$ORIGINAL_PATH"; then diff --git a/utils/generateREADME.sh b/utils/generateREADME.sh index 902b98c412..c361eab83d 100755 --- a/utils/generateREADME.sh +++ b/utils/generateREADME.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e IN=${1:-README.md} diff --git a/utils/generateSwagger.sh b/utils/generateSwagger.sh index b7d37810d2..b1e0e4f3ea 100755 --- a/utils/generateSwagger.sh +++ b/utils/generateSwagger.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash exec python \ `pwd`/utils/generateSwagger.py \ diff --git a/utils/gitjslint.sh b/utils/gitjslint.sh index f0e8a4fa8f..f5f25008ba 100755 --- a/utils/gitjslint.sh +++ b/utils/gitjslint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if test "`git status --short | grep '^\(.[MAU]\|[MAU].\) .*js$' | wc -l`" -eq 0; then exit 0; diff --git a/utils/manPages.sh b/utils/manPages.sh index d03166fb88..c5a29c7d25 100755 --- a/utils/manPages.sh +++ b/utils/manPages.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash IN="$1" OUT="$2" diff --git a/utils/reformat.sh b/utils/reformat.sh index 66962b8883..5d830a1eb5 100755 --- a/utils/reformat.sh +++ b/utils/reformat.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash find arangod arangosh lib enterprise \ -name Zip -prune -o \ diff --git a/utils/replace_string.sh b/utils/replace_string.sh index 4eb0f70655..e8ff44395f 100755 --- a/utils/replace_string.sh +++ b/utils/replace_string.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash while read file; do echo "$file: $1 -> $2"