diff options
author | Richard Samuels <richard.l.samuels@gmail.com> | 2021-06-24 19:45:51 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-02 02:08:51 +0000 |
commit | 8a30e2e888640f58bd7e5134e14b39de4b0b1491 (patch) | |
tree | 72e16e9201e83f34265e0ed3a595b9e5794e0e32 /evergreen/functions | |
parent | 951dfeb5aca55cc881293372dfda4b72bb478b92 (diff) | |
download | mongo-8a30e2e888640f58bd7e5134e14b39de4b0b1491.tar.gz |
SERVER-57140 reformat shell scripts and allow space between redirect operators
Diffstat (limited to 'evergreen/functions')
23 files changed, 57 insertions, 57 deletions
diff --git a/evergreen/functions/added_and_modified_patch_files_get.sh b/evergreen/functions/added_and_modified_patch_files_get.sh index 3e07fbf695d..608b53787ef 100755 --- a/evergreen/functions/added_and_modified_patch_files_get.sh +++ b/evergreen/functions/added_and_modified_patch_files_get.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src @@ -6,9 +6,9 @@ cd src set -o verbose set -o errexit -git diff --name-only origin/${branch_name}... --line-prefix="${workdir}/src/" --diff-filter=d >>modified_and_created_patch_files.txt +git diff --name-only origin/${branch_name}... --line-prefix="${workdir}/src/" --diff-filter=d >> modified_and_created_patch_files.txt if [ -d src/mongo/db/modules/enterprise ]; then pushd src/mongo/db/modules/enterprise - git diff HEAD --name-only --line-prefix="${workdir}/src/src/mongo/db/modules/enterprise/" --diff-filter=d >>~1/modified_and_created_patch_files.txt + git diff HEAD --name-only --line-prefix="${workdir}/src/src/mongo/db/modules/enterprise/" --diff-filter=d >> ~1/modified_and_created_patch_files.txt popd fi diff --git a/evergreen/functions/aws_test_credentials_load.sh b/evergreen/functions/aws_test_credentials_load.sh index b2402f5b75b..289c125f9b5 100644 --- a/evergreen/functions/aws_test_credentials_load.sh +++ b/evergreen/functions/aws_test_credentials_load.sh @@ -1,15 +1,15 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src set -o errexit -echo "const AWS_KMS_SECRET_ID = '${aws_kms_access_key_id}';" >>src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js -echo "const AWS_KMS_SECRET_KEY = '${aws_kms_secret_access_key}';" >>src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js +echo "const AWS_KMS_SECRET_ID = '${aws_kms_access_key_id}';" >> src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js +echo "const AWS_KMS_SECRET_KEY = '${aws_kms_secret_access_key}';" >> src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js -echo "const KMS_GCP_EMAIL = '${kms_gcp_email}'; " >>src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js -echo "const KMS_GCP_PRIVATEKEY = '${kms_gcp_privatekey}'; " >>src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js +echo "const KMS_GCP_EMAIL = '${kms_gcp_email}'; " >> src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js +echo "const KMS_GCP_PRIVATEKEY = '${kms_gcp_privatekey}'; " >> src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js -echo "const KMS_AZURE_TENANT_ID = '${kms_azure_tenant_id}';" >>src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js -echo "const KMS_AZURE_CLIENT_ID = '${kms_azure_client_id}';" >>src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js -echo "const KMS_AZURE_CLIENT_SECRET = '${kms_azure_client_secret}';" >>src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js +echo "const KMS_AZURE_TENANT_ID = '${kms_azure_tenant_id}';" >> src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js +echo "const KMS_AZURE_CLIENT_ID = '${kms_azure_client_id}';" >> src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js +echo "const KMS_AZURE_CLIENT_SECRET = '${kms_azure_client_secret}';" >> src/mongo/db/modules/enterprise/jstests/fle/lib/aws_secrets.js diff --git a/evergreen/functions/bf_suggestion_service_call.sh b/evergreen/functions/bf_suggestion_service_call.sh index d022bf38cf7..ebc3004a6c4 100755 --- a/evergreen/functions/bf_suggestion_service_call.sh +++ b/evergreen/functions/bf_suggestion_service_call.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src @@ -17,6 +17,6 @@ if [ -f $report_file ] && grep -Eq "\"failures\": [1-9]" $report_file; then --silent \ --show-error \ --config - \ - https://bfsuggestion.corp.mongodb.com/tasks <<<$user_option + https://bfsuggestion.corp.mongodb.com/tasks <<< $user_option echo "Request to BF Suggestion service status: $?" fi diff --git a/evergreen/functions/binaries_extract.sh b/evergreen/functions/binaries_extract.sh index efa7089ec3f..ec7b8dd3f8f 100755 --- a/evergreen/functions/binaries_extract.sh +++ b/evergreen/functions/binaries_extract.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src diff --git a/evergreen/functions/binary_version_check.sh b/evergreen/functions/binary_version_check.sh index f5f1a74487c..ac01374a07e 100755 --- a/evergreen/functions/binary_version_check.sh +++ b/evergreen/functions/binary_version_check.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src diff --git a/evergreen/functions/compile_expansions_generate.sh b/evergreen/functions/compile_expansions_generate.sh index f812173f397..dc9642f5cd4 100644 --- a/evergreen/functions/compile_expansions_generate.sh +++ b/evergreen/functions/compile_expansions_generate.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src @@ -31,7 +31,7 @@ if [ ! -z ${scons_cache_scope} ]; then if [ "Windows_NT" = "$OS" ]; then ./win_mount.sh else - mount | grep "\/efs" >/dev/null + mount | grep "\/efs" > /dev/null if [ $? -eq 0 ]; then echo "Shared cache is already mounted" else diff --git a/evergreen/functions/credentials_setup.sh b/evergreen/functions/credentials_setup.sh index 4f0605a45bf..15be8ea1e66 100755 --- a/evergreen/functions/credentials_setup.sh +++ b/evergreen/functions/credentials_setup.sh @@ -1,9 +1,9 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src -cat >mci.buildlogger <<END_OF_CREDS +cat > mci.buildlogger << END_OF_CREDS slavename='${slave}' passwd='${passwd}' builder='MCI_${build_variant}' diff --git a/evergreen/functions/evergreen_api_credentials_configure.sh b/evergreen/functions/evergreen_api_credentials_configure.sh index c42f637a2c9..78943d01682 100755 --- a/evergreen/functions/evergreen_api_credentials_configure.sh +++ b/evergreen/functions/evergreen_api_credentials_configure.sh @@ -1,10 +1,10 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src # Create the Evergreen API credentials -cat >.evergreen.yml <<END_OF_CREDS +cat > .evergreen.yml << END_OF_CREDS api_server_host: https://evergreen.mongodb.com/api api_key: "${evergreen_api_key}" user: "${evergreen_api_user}" diff --git a/evergreen/functions/files_remove.sh b/evergreen/functions/files_remove.sh index a2c905cdedd..db3631942d7 100755 --- a/evergreen/functions/files_remove.sh +++ b/evergreen/functions/files_remove.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" if [ -z "${files}" ]; then diff --git a/evergreen/functions/modified_patch_files_get_all.sh b/evergreen/functions/modified_patch_files_get_all.sh index 5e79cc6ce0d..1789d65bdb2 100755 --- a/evergreen/functions/modified_patch_files_get_all.sh +++ b/evergreen/functions/modified_patch_files_get_all.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src @@ -9,11 +9,11 @@ set -o errexit # For patch builds gather the modified patch files. if [ "${is_patch}" = "true" ]; then # Get list of patched files - git diff HEAD --name-only >>patch_files.txt + git diff HEAD --name-only >> patch_files.txt if [ -d src/mongo/db/modules/enterprise ]; then pushd src/mongo/db/modules/enterprise # Update the patch_files.txt in the mongo repo. - git diff HEAD --name-only >>~1/patch_files.txt + git diff HEAD --name-only >> ~1/patch_files.txt popd fi fi diff --git a/evergreen/functions/notary_client_credentials_setup.sh b/evergreen/functions/notary_client_credentials_setup.sh index a1dab18b8cc..71c08335d73 100755 --- a/evergreen/functions/notary_client_credentials_setup.sh +++ b/evergreen/functions/notary_client_credentials_setup.sh @@ -1,14 +1,14 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src set -o errexit -cat <<EOF >notary_env.sh +cat << EOF > notary_env.sh export NOTARY_TOKEN=${signing_auth_token_50} export BARQUE_USERNAME=${barque_user} export BARQUE_API_KEY=${barque_api_key} EOF -echo "${signing_auth_token_50}" >signing_auth_token +echo "${signing_auth_token_50}" > signing_auth_token diff --git a/evergreen/functions/process_threads_monitor.sh b/evergreen/functions/process_threads_monitor.sh index c28269a1552..10ae24c343d 100755 --- a/evergreen/functions/process_threads_monitor.sh +++ b/evergreen/functions/process_threads_monitor.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" proc_list="(java|lein|mongo|python|_test$|_test\.exe$)" @@ -11,7 +11,7 @@ if [ "Windows_NT" = "$OS" ]; then } get_process_info() { proc_name="" - proc_info=$(wmic process where "ProcessId=\"$1\"" get "Name,ProcessId,ThreadCount" /format:csv 2>/dev/null | grep $1) + proc_info=$(wmic process where "ProcessId=\"$1\"" get "Name,ProcessId,ThreadCount" /format:csv 2> /dev/null | grep $1) if [ ! -z $proc_info ]; then proc_name=$(echo $proc_info | cut -f2 -d ',') proc_threads=$(echo $proc_info | cut -f4 -d ',') diff --git a/evergreen/functions/remote_credentials_setup.sh b/evergreen/functions/remote_credentials_setup.sh index c5547aa2ba8..65f6a244816 100644 --- a/evergreen/functions/remote_credentials_setup.sh +++ b/evergreen/functions/remote_credentials_setup.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" # Since the macros 'private_key_remote' and 'private_key_file' are not always defined @@ -9,7 +9,7 @@ fi if [ ! -z "${private_key_remote}" ] && [ ! -z "${private_key_file}" ]; then mkdir -p ~/.ssh private_key_file=$(eval echo "$private_key_file") - echo -n "${private_key_remote}" >${private_key_file} + echo -n "${private_key_remote}" > ${private_key_file} chmod 0600 ${private_key_file} fi @@ -28,19 +28,19 @@ if [ $aws_profile = "default" ]; then else aws_profile_config="[profile $aws_profile]" fi -cat <<EOF >>~/.aws/config +cat << EOF >> ~/.aws/config $aws_profile_config region = us-east-1 EOF # The profile in the credentials file is specified as [<profile>]. -cat <<EOF >>~/.aws/credentials +cat << EOF >> ~/.aws/credentials [$aws_profile] aws_access_key_id = ${aws_key_remote} aws_secret_access_key = ${aws_secret_remote} EOF -cat <<EOF >~/.boto +cat << EOF > ~/.boto [Boto] https_validate_certificates = False EOF diff --git a/evergreen/functions/resmoke_jobs_determine.sh b/evergreen/functions/resmoke_jobs_determine.sh index 036e8b00154..9703078ee32 100755 --- a/evergreen/functions/resmoke_jobs_determine.sh +++ b/evergreen/functions/resmoke_jobs_determine.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src diff --git a/evergreen/functions/run_diskstats.sh b/evergreen/functions/run_diskstats.sh index d79141cdb2c..d118f3ae0eb 100755 --- a/evergreen/functions/run_diskstats.sh +++ b/evergreen/functions/run_diskstats.sh @@ -3,20 +3,20 @@ set -o verbose # On Windows we can use typeperf.exe to dump performance counters. if [ "Windows_NT" = "$OS" ]; then - typeperf -qx PhysicalDisk | grep Disk | grep -v _Total >disk_counters.txt + typeperf -qx PhysicalDisk | grep Disk | grep -v _Total > disk_counters.txt typeperf -cf disk_counters.txt -si 5 -o mongo-diskstats # Linux: iostat -t option for timestamp. -elif iostat -tdmx >/dev/null 2>&1; then - iostat -tdmx 5 >mongo-diskstats +elif iostat -tdmx > /dev/null 2>&1; then + iostat -tdmx 5 > mongo-diskstats # OSX: Simulate the iostat timestamp. -elif iostat -d >/dev/null 2>&1; then - iostat -d -w 5 | while IFS= read -r line; do printf '%s %s\n' "$(date +'%m/%d/%Y %H:%M:%S')" "$line" >>mongo-diskstats; done +elif iostat -d > /dev/null 2>&1; then + iostat -d -w 5 | while IFS= read -r line; do printf '%s %s\n' "$(date +'%m/%d/%Y %H:%M:%S')" "$line" >> mongo-diskstats; done # Check if vmstat -t is available. -elif vmstat -td >/dev/null 2>&1; then - vmstat -td 5 >mongo-diskstats +elif vmstat -td > /dev/null 2>&1; then + vmstat -td 5 > mongo-diskstats # Check if vmstat -T d is available. -elif vmstat -T d >/dev/null 2>&1; then - vmstat -T d 5 >mongo-diskstats +elif vmstat -T d > /dev/null 2>&1; then + vmstat -T d 5 > mongo-diskstats else printf "Cannot collect mongo-diskstats on this platform\n" fi diff --git a/evergreen/functions/selected_tests_credentials_configure.sh b/evergreen/functions/selected_tests_credentials_configure.sh index 964cdc128a0..253880c2c85 100755 --- a/evergreen/functions/selected_tests_credentials_configure.sh +++ b/evergreen/functions/selected_tests_credentials_configure.sh @@ -1,10 +1,10 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src # Create the Evergreen API credentials -cat >.selected_tests.yml <<END_OF_CREDS +cat > .selected_tests.yml << END_OF_CREDS url: "https://selected-tests.server-tig.prod.corp.mongodb.com" project: "${project}" auth_user: "${selected_tests_auth_user}" diff --git a/evergreen/functions/shared_scons_cache_pruning.sh b/evergreen/functions/shared_scons_cache_pruning.sh index 87219355a82..379fc75348d 100755 --- a/evergreen/functions/shared_scons_cache_pruning.sh +++ b/evergreen/functions/shared_scons_cache_pruning.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src @@ -15,7 +15,7 @@ if [[ "${project}" == "mongodb-mongo-master" ]]; then if [ "Windows_NT" = "$OS" ]; then ./win_mount.sh else - mount | grep "\/efs" >/dev/null + mount | grep "\/efs" > /dev/null fi if [ $? -eq 0 ]; then echo "Shared cache is already mounted" diff --git a/evergreen/functions/shared_scons_directory_umount.sh b/evergreen/functions/shared_scons_directory_umount.sh index 6d50da0fdae..06d0465161e 100755 --- a/evergreen/functions/shared_scons_directory_umount.sh +++ b/evergreen/functions/shared_scons_directory_umount.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src diff --git a/evergreen/functions/system_resource_info_collect.sh b/evergreen/functions/system_resource_info_collect.sh index 9b9129e6abf..fd3310822c3 100755 --- a/evergreen/functions/system_resource_info_collect.sh +++ b/evergreen/functions/system_resource_info_collect.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src diff --git a/evergreen/functions/task_timeout_determine.sh b/evergreen/functions/task_timeout_determine.sh index 7a43e097939..645aedbc302 100644 --- a/evergreen/functions/task_timeout_determine.sh +++ b/evergreen/functions/task_timeout_determine.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src diff --git a/evergreen/functions/venv_setup.sh b/evergreen/functions/venv_setup.sh index ec86d7bb539..c0e3ef50017 100644 --- a/evergreen/functions/venv_setup.sh +++ b/evergreen/functions/venv_setup.sh @@ -1,7 +1,7 @@ # exit immediately if virtualenv is not found set -o errexit -evergreen_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)/.." +evergreen_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)/.." . "$evergreen_dir/prelude_workdir.sh" . "$evergreen_dir/prelude_python.sh" @@ -53,4 +53,4 @@ if [ $? != 0 ]; then cat install.log exit 1 fi -python -m pip freeze >pip-requirements.txt +python -m pip freeze > pip-requirements.txt diff --git a/evergreen/functions/win_mount_script_setup.sh b/evergreen/functions/win_mount_script_setup.sh index cf574840e9f..fee19f93cb3 100755 --- a/evergreen/functions/win_mount_script_setup.sh +++ b/evergreen/functions/win_mount_script_setup.sh @@ -1,9 +1,9 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src -cat <<EOF >win_mount.sh +cat << EOF > win_mount.sh net use X: '\\\\${win_scons_endpoint}\\share' /USER:"wincache.build.com\\${win_scons_user}" '${win_scons_pass}' EOF chmod +x win_mount.sh diff --git a/evergreen/functions/wiredtiger_develop_use.sh b/evergreen/functions/wiredtiger_develop_use.sh index db913aac939..7aee7ac973d 100755 --- a/evergreen/functions/wiredtiger_develop_use.sh +++ b/evergreen/functions/wiredtiger_develop_use.sh @@ -1,4 +1,4 @@ -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/../prelude.sh" cd src |