From 48fc0c184b661f8a66ecfbad866a44c29efbabaa Mon Sep 17 00:00:00 2001 From: Aleksandr Myrnyi Date: Thu, 5 Dec 2024 15:50:42 +0700 Subject: [PATCH] SC-21893: Shebang is not platform agnostic (#538) Co-authored-by: Valerii Trots --- bin/command/build/baked/build.sh | 2 +- bin/command/build/baked/export.sh | 2 +- bin/command/build/mount/build.sh | 2 +- bin/command/build/mount/export.sh | 2 +- bin/command/build/pull.sh | 2 +- bin/command/cli/cli.sh | 2 +- bin/command/cli/console.sh | 2 +- bin/command/cli/testing.sh | 2 +- bin/command/compose/down.sh | 2 +- bin/command/compose/exec.sh | 2 +- bin/command/compose/ps.sh | 2 +- bin/command/compose/restart.sh | 2 +- bin/command/compose/run.sh | 2 +- bin/command/compose/stop.sh | 2 +- bin/command/compose/up.sh | 2 +- bin/command/deploy.sh | 2 +- bin/command/help.sh | 2 +- bin/command/install/bootstrap.sh | 2 +- bin/command/install/clean.sh | 2 +- bin/command/install/config.sh | 2 +- bin/command/install/install.sh | 2 +- bin/command/install/reset.sh | 2 +- bin/command/internal/prune.sh | 2 +- bin/command/internal/sync.sh | 2 +- bin/command/internal/trouble.sh | 2 +- bin/command/runtime/clean-data.sh | 2 +- bin/command/runtime/demo.sh | 2 +- bin/command/runtime/jobs.sh | 2 +- bin/command/runtime/logs.sh | 2 +- bin/command/runtime/wait.sh | 2 +- bin/command/uknown.sh | 2 +- bin/environment/check-directories.sh | 2 +- bin/environment/composer.sh | 2 +- bin/environment/cross-platform.sh | 2 +- bin/environment/docker-compose.sh | 2 +- bin/environment/docker.sh | 2 +- bin/environment/get-real-project-path.sh | 2 +- bin/framework.sh | 2 +- bin/installer/autoload-cache.sh | 2 +- bin/installer/hosts.sh | 2 +- bin/installer/jenkins-template.sh | 2 +- bin/installer/nfs.sh | 2 +- bin/lib/bool.sh | 2 +- bin/lib/string.sh | 2 +- bin/lib/version.sh | 2 +- bin/platform.sh | 2 +- bin/registry/command.sh | 2 +- bin/registry/flow.sh | 2 +- bin/registry/help.sh | 2 +- bin/registry/installer.sh | 2 +- bin/registry/require.sh | 2 +- bin/registry/trap.sh | 2 +- bin/sdk/assets/baked.sh | 2 +- bin/sdk/assets/mount.sh | 2 +- bin/sdk/codebase/baked.sh | 2 +- bin/sdk/codebase/mount.sh | 2 +- bin/sdk/compose.sh | 2 +- bin/sdk/data/demo.sh | 2 +- bin/sdk/images/baked.sh | 2 +- bin/sdk/images/baked/ecr.sh | 2 +- bin/sdk/images/common.sh | 2 +- bin/sdk/images/mount.sh | 2 +- bin/sdk/mount/baked.sh | 2 +- bin/sdk/mount/docker-sync.sh | 2 +- bin/sdk/mount/mutagen.sh | 2 +- bin/sdk/mount/native.sh | 2 +- bin/sdk/mount/nfs.sh | 2 +- bin/sdk/runtime/wait.sh | 2 +- bin/sentinels/autoload/autoload.sh | 2 +- bin/service/broker/rabbitmq.sh | 2 +- bin/service/database/mysql.sh | 2 +- bin/service/database/postgres.sh | 2 +- bin/service/scheduler/jenkins.sh | 2 +- bin/service/service.sh | 2 +- bin/standalone/cli.sh | 2 +- bin/standalone/console.sh | 2 +- bin/standalone/constants.sh | 2 +- bin/standalone/logo/spryker-cli.sh | 2 +- bin/standalone/logo/spryker-sdk.sh | 2 +- ci/tests.sh | 2 +- ci/tests/registry/trap/chech-remove.case.sh | 2 +- ci/tests/registry/trap/check-edge.case.sh | 2 +- ci/tests/registry/trap/check-on-exit.case.sh | 2 +- ci/tests/registry/trap/check-release.case.sh | 2 +- ci/tests/registry/trap/trap.test.sh | 2 +- context/jenkins/export/entrypoint.sh | 2 +- context/jenkins/spryker.sh | 2 +- generator/openssl/generate.sh | 2 +- generator/src/templates/deploy.bash.twig | 2 +- sdk | 2 +- 90 files changed, 90 insertions(+), 90 deletions(-) diff --git a/bin/command/build/baked/build.sh b/bin/command/build/baked/build.sh index 28754a4be..15a591ef3 100644 --- a/bin/command/build/baked/build.sh +++ b/bin/command/build/baked/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "build" "Command::build" diff --git a/bin/command/build/baked/export.sh b/bin/command/build/baked/export.sh index fafe5d109..c227a4cfd 100644 --- a/bin/command/build/baked/export.sh +++ b/bin/command/build/baked/export.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "export" "Command::export" diff --git a/bin/command/build/mount/build.sh b/bin/command/build/mount/build.sh index e37686ce5..65a2c8c7b 100644 --- a/bin/command/build/mount/build.sh +++ b/bin/command/build/mount/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "build" "Command::build" diff --git a/bin/command/build/mount/export.sh b/bin/command/build/mount/export.sh index c2e91f65a..b95991498 100644 --- a/bin/command/build/mount/export.sh +++ b/bin/command/build/mount/export.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "export" "Command::export" diff --git a/bin/command/build/pull.sh b/bin/command/build/pull.sh index 5c3596ea7..8816886e8 100644 --- a/bin/command/build/pull.sh +++ b/bin/command/build/pull.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "pull" "Command::pull" diff --git a/bin/command/cli/cli.sh b/bin/command/cli/cli.sh index 7377e65cb..d4c262fff 100644 --- a/bin/command/cli/cli.sh +++ b/bin/command/cli/cli.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "cli" "Command::cli" diff --git a/bin/command/cli/console.sh b/bin/command/cli/console.sh index d0e5991cc..0b9988459 100644 --- a/bin/command/cli/console.sh +++ b/bin/command/cli/console.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "console" "Command::console" diff --git a/bin/command/cli/testing.sh b/bin/command/cli/testing.sh index 04eb08dbc..802cf8174 100644 --- a/bin/command/cli/testing.sh +++ b/bin/command/cli/testing.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "testing" "Command::testing" diff --git a/bin/command/compose/down.sh b/bin/command/compose/down.sh index e8064e111..4bdfb201f 100644 --- a/bin/command/compose/down.sh +++ b/bin/command/compose/down.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "down" "Command::down" diff --git a/bin/command/compose/exec.sh b/bin/command/compose/exec.sh index bdbce0c29..ceb2f63da 100644 --- a/bin/command/compose/exec.sh +++ b/bin/command/compose/exec.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "exec" "Command::exec" diff --git a/bin/command/compose/ps.sh b/bin/command/compose/ps.sh index 5b08df7fa..d925cec3d 100644 --- a/bin/command/compose/ps.sh +++ b/bin/command/compose/ps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "ps" "Command::ps" diff --git a/bin/command/compose/restart.sh b/bin/command/compose/restart.sh index b0e9c11d1..8ea0c3f97 100644 --- a/bin/command/compose/restart.sh +++ b/bin/command/compose/restart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "restart" "Command::restart" diff --git a/bin/command/compose/run.sh b/bin/command/compose/run.sh index b11ddc6b2..865913d57 100644 --- a/bin/command/compose/run.sh +++ b/bin/command/compose/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "run" "Command::run" Registry::addCommand "start" "Command::run" diff --git a/bin/command/compose/stop.sh b/bin/command/compose/stop.sh index 3d71f0ca3..b4dd02a61 100644 --- a/bin/command/compose/stop.sh +++ b/bin/command/compose/stop.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "stop" "Command::stop" diff --git a/bin/command/compose/up.sh b/bin/command/compose/up.sh index cbf7bcb9a..90313341b 100644 --- a/bin/command/compose/up.sh +++ b/bin/command/compose/up.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "up" "Command::up" diff --git a/bin/command/deploy.sh b/bin/command/deploy.sh index d5e2f03fa..83287d3c7 100644 --- a/bin/command/deploy.sh +++ b/bin/command/deploy.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::Help::section "Usage in runtime:" Registry::Help::command -s -a " [-vxt]" diff --git a/bin/command/help.sh b/bin/command/help.sh index 1a7b60808..4795b54d8 100644 --- a/bin/command/help.sh +++ b/bin/command/help.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "help" "Command::help" Registry::addCommand "" "Command::help" diff --git a/bin/command/install/bootstrap.sh b/bin/command/install/bootstrap.sh index 34ebe8000..4fb748f12 100644 --- a/bin/command/install/bootstrap.sh +++ b/bin/command/install/bootstrap.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash require docker diff --git a/bin/command/install/clean.sh b/bin/command/install/clean.sh index b31cc3ac7..22f9075f2 100644 --- a/bin/command/install/clean.sh +++ b/bin/command/install/clean.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "clean" "Command::clean" diff --git a/bin/command/install/config.sh b/bin/command/install/config.sh index e34738968..1e78cbee4 100644 --- a/bin/command/install/config.sh +++ b/bin/command/install/config.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "config" "Command::config" diff --git a/bin/command/install/install.sh b/bin/command/install/install.sh index 5041e8dcc..01442f80c 100644 --- a/bin/command/install/install.sh +++ b/bin/command/install/install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "install" "Command::install" diff --git a/bin/command/install/reset.sh b/bin/command/install/reset.sh index d51be71b6..4e50c0dab 100644 --- a/bin/command/install/reset.sh +++ b/bin/command/install/reset.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "reset" "Command::reset" diff --git a/bin/command/internal/prune.sh b/bin/command/internal/prune.sh index cf6f13fdc..2fdb2a4c2 100644 --- a/bin/command/internal/prune.sh +++ b/bin/command/internal/prune.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "prune" "Command::prune" Registry::Help::command -c "prune [--f] [--a]" "Remove all docker data(images, volume, system and builder) and project artifacts." diff --git a/bin/command/internal/sync.sh b/bin/command/internal/sync.sh index 152accdd7..326aafd02 100644 --- a/bin/command/internal/sync.sh +++ b/bin/command/internal/sync.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "sync" "Command::sync" diff --git a/bin/command/internal/trouble.sh b/bin/command/internal/trouble.sh index e226ec8a7..093117a46 100644 --- a/bin/command/internal/trouble.sh +++ b/bin/command/internal/trouble.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "trouble" "Command::trouble" diff --git a/bin/command/runtime/clean-data.sh b/bin/command/runtime/clean-data.sh index 80c333202..117dfb27d 100644 --- a/bin/command/runtime/clean-data.sh +++ b/bin/command/runtime/clean-data.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "clean-data" "Command::clean-data" diff --git a/bin/command/runtime/demo.sh b/bin/command/runtime/demo.sh index 640d5817e..c6e7c8fab 100644 --- a/bin/command/runtime/demo.sh +++ b/bin/command/runtime/demo.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "demo" "Command::demo" Registry::addCommand "demo-data" "Command::demo" diff --git a/bin/command/runtime/jobs.sh b/bin/command/runtime/jobs.sh index 169e23395..ff9997c8c 100644 --- a/bin/command/runtime/jobs.sh +++ b/bin/command/runtime/jobs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "jobs" "Command::jobs" diff --git a/bin/command/runtime/logs.sh b/bin/command/runtime/logs.sh index cbebd1ba4..d1ccb27cf 100644 --- a/bin/command/runtime/logs.sh +++ b/bin/command/runtime/logs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "logs" "Command::logs" diff --git a/bin/command/runtime/wait.sh b/bin/command/runtime/wait.sh index 7428eed08..c04894ff8 100644 --- a/bin/command/runtime/wait.sh +++ b/bin/command/runtime/wait.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::addCommand "wait" "Command::wait" diff --git a/bin/command/uknown.sh b/bin/command/uknown.sh index 8d6895b2c..d1419fc8d 100644 --- a/bin/command/uknown.sh +++ b/bin/command/uknown.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Command::unknown() { local command=${1} diff --git a/bin/environment/check-directories.sh b/bin/environment/check-directories.sh index 9dd365b8c..84de34cc6 100644 --- a/bin/environment/check-directories.sh +++ b/bin/environment/check-directories.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Environment::checkDirectories() { local projectDirectoryPath="${1:-$(pwd)}" diff --git a/bin/environment/composer.sh b/bin/environment/composer.sh index 50de02692..046b83e00 100644 --- a/bin/environment/composer.sh +++ b/bin/environment/composer.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Environment::Composer() { diff --git a/bin/environment/cross-platform.sh b/bin/environment/cross-platform.sh index c98cfeedc..f7ee3c696 100644 --- a/bin/environment/cross-platform.sh +++ b/bin/environment/cross-platform.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Environment::crossPlatform() { export XARGS_NO_RUN_IF_EMPTY=$(echo '' | xargs echo "--no-run-if-empty") diff --git a/bin/environment/docker-compose.sh b/bin/environment/docker-compose.sh index 07f6c7695..e264b498f 100644 --- a/bin/environment/docker-compose.sh +++ b/bin/environment/docker-compose.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export COMPOSE_HTTP_TIMEOUT=400 export COMPOSE_CONVERT_WINDOWS_PATHS=1 diff --git a/bin/environment/docker.sh b/bin/environment/docker.sh index 020e064a0..0281a4388 100644 --- a/bin/environment/docker.sh +++ b/bin/environment/docker.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export DOCKER_BUILDKIT=1 diff --git a/bin/environment/get-real-project-path.sh b/bin/environment/get-real-project-path.sh index 139dca8fe..b44313060 100755 --- a/bin/environment/get-real-project-path.sh +++ b/bin/environment/get-real-project-path.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Environment::getRealProjectPath() { local projectPath=${PROJECT_DIR:-$(pwd)} diff --git a/bin/framework.sh b/bin/framework.sh index ee0a8aa66..2aa4a161e 100644 --- a/bin/framework.sh +++ b/bin/framework.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e shopt -s extglob expand_aliases diff --git a/bin/installer/autoload-cache.sh b/bin/installer/autoload-cache.sh index 9a7724a52..994aff057 100644 --- a/bin/installer/autoload-cache.sh +++ b/bin/installer/autoload-cache.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash require node npm diff --git a/bin/installer/hosts.sh b/bin/installer/hosts.sh index a8e3154e7..d380af4d0 100644 --- a/bin/installer/hosts.sh +++ b/bin/installer/hosts.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/bin/installer/jenkins-template.sh b/bin/installer/jenkins-template.sh index 0a9de5fe8..6b2dbde70 100644 --- a/bin/installer/jenkins-template.sh +++ b/bin/installer/jenkins-template.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Installer::jenkins-template() { diff --git a/bin/installer/nfs.sh b/bin/installer/nfs.sh index b2b61ddae..c4de64b6f 100644 --- a/bin/installer/nfs.sh +++ b/bin/installer/nfs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash import environment/docker.sh import environment/get-real-project-path.sh diff --git a/bin/lib/bool.sh b/bin/lib/bool.sh index d79610bef..1eaac737b 100644 --- a/bin/lib/bool.sh +++ b/bin/lib/bool.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Bool::normalizeBashBool() { case "${1}" in diff --git a/bin/lib/string.sh b/bin/lib/string.sh index bbc376e67..9e47278ff 100644 --- a/bin/lib/string.sh +++ b/bin/lib/string.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function String::trimWhitespaces() { echo -n "${*}" | tr -d " /n/r" diff --git a/bin/lib/version.sh b/bin/lib/version.sh index 14165d25d..0c0992adb 100644 --- a/bin/lib/version.sh +++ b/bin/lib/version.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash require awk diff --git a/bin/platform.sh b/bin/platform.sh index 2cb7014d5..e7d2a2f62 100755 --- a/bin/platform.sh +++ b/bin/platform.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Platform::getPlatform() { local uname=$(uname) diff --git a/bin/registry/command.sh b/bin/registry/command.sh index c86fd523c..e3c98079b 100644 --- a/bin/registry/command.sh +++ b/bin/registry/command.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash declare -a COMMAND_FUNCTIONS diff --git a/bin/registry/flow.sh b/bin/registry/flow.sh index 75d826b47..7c939825b 100644 --- a/bin/registry/flow.sh +++ b/bin/registry/flow.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash declare -a FLOW_BOOT declare -a FLOW_BEFORE_UP diff --git a/bin/registry/help.sh b/bin/registry/help.sh index 1c375a9fe..2d3ecbbb4 100644 --- a/bin/registry/help.sh +++ b/bin/registry/help.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash Registry::require tr diff --git a/bin/registry/installer.sh b/bin/registry/installer.sh index 865015667..52de572cd 100644 --- a/bin/registry/installer.sh +++ b/bin/registry/installer.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash declare -a INSTALLER_FUNCTIONS diff --git a/bin/registry/require.sh b/bin/registry/require.sh index aa574de5b..b1ae74b97 100644 --- a/bin/registry/require.sh +++ b/bin/registry/require.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash declare -a REQUIRE_CHECKERS declare -a REQUIRE_BINARIES diff --git a/bin/registry/trap.sh b/bin/registry/trap.sh index 16e8f6ca5..35ced3ceb 100644 --- a/bin/registry/trap.sh +++ b/bin/registry/trap.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash declare -a TRAP_ON_EXIT diff --git a/bin/sdk/assets/baked.sh b/bin/sdk/assets/baked.sh index e7cefe137..4efebfa91 100755 --- a/bin/sdk/assets/baked.sh +++ b/bin/sdk/assets/baked.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Assets::export() { # deprecated diff --git a/bin/sdk/assets/mount.sh b/bin/sdk/assets/mount.sh index 439567e0b..9d7a60b3f 100644 --- a/bin/sdk/assets/mount.sh +++ b/bin/sdk/assets/mount.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Assets::export() { # nothing to do diff --git a/bin/sdk/codebase/baked.sh b/bin/sdk/codebase/baked.sh index 22c63e1fb..b8cd5e8cf 100644 --- a/bin/sdk/codebase/baked.sh +++ b/bin/sdk/codebase/baked.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Codebase::build() { return "${TRUE}" diff --git a/bin/sdk/codebase/mount.sh b/bin/sdk/codebase/mount.sh index 5ef8e1b1f..739b47dc5 100644 --- a/bin/sdk/codebase/mount.sh +++ b/bin/sdk/codebase/mount.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Codebase::build() { Console::verbose "${INFO}Building codebase${NC}" diff --git a/bin/sdk/compose.sh b/bin/sdk/compose.sh index b972a182d..15637cf27 100644 --- a/bin/sdk/compose.sh +++ b/bin/sdk/compose.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # shellcheck disable=SC2155 diff --git a/bin/sdk/data/demo.sh b/bin/sdk/data/demo.sh index 358b61f97..28cf2da62 100644 --- a/bin/sdk/data/demo.sh +++ b/bin/sdk/data/demo.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Data::isLoaded() { Console::start "Checking is demo data loaded for ${SPRYKER_CURRENT_REGION}... " diff --git a/bin/sdk/images/baked.sh b/bin/sdk/images/baked.sh index a38ac6488..223d9b0c1 100644 --- a/bin/sdk/images/baked.sh +++ b/bin/sdk/images/baked.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash import sdk/images/common.sh diff --git a/bin/sdk/images/baked/ecr.sh b/bin/sdk/images/baked/ecr.sh index 3d0446102..b0cfa2ddb 100644 --- a/bin/sdk/images/baked/ecr.sh +++ b/bin/sdk/images/baked/ecr.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash import sdk/images/baked.sh diff --git a/bin/sdk/images/common.sh b/bin/sdk/images/common.sh index 411d0a184..81533e61e 100644 --- a/bin/sdk/images/common.sh +++ b/bin/sdk/images/common.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash require docker diff --git a/bin/sdk/images/mount.sh b/bin/sdk/images/mount.sh index a9c047797..e055cb821 100644 --- a/bin/sdk/images/mount.sh +++ b/bin/sdk/images/mount.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash import sdk/images/common.sh diff --git a/bin/sdk/mount/baked.sh b/bin/sdk/mount/baked.sh index 2f3b9db25..42c165af2 100644 --- a/bin/sdk/mount/baked.sh +++ b/bin/sdk/mount/baked.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Mount::logs() { Console::error "This mount mode does not support logging." diff --git a/bin/sdk/mount/docker-sync.sh b/bin/sdk/mount/docker-sync.sh index aff1517ee..46eebcb36 100755 --- a/bin/sdk/mount/docker-sync.sh +++ b/bin/sdk/mount/docker-sync.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash require docker docker-sync grep sed diff --git a/bin/sdk/mount/mutagen.sh b/bin/sdk/mount/mutagen.sh index a22cd7fda..defee8829 100644 --- a/bin/sdk/mount/mutagen.sh +++ b/bin/sdk/mount/mutagen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash require docker grep awk diff --git a/bin/sdk/mount/native.sh b/bin/sdk/mount/native.sh index 2f3b9db25..42c165af2 100644 --- a/bin/sdk/mount/native.sh +++ b/bin/sdk/mount/native.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Mount::logs() { Console::error "This mount mode does not support logging." diff --git a/bin/sdk/mount/nfs.sh b/bin/sdk/mount/nfs.sh index 77b91bb9b..2462db745 100644 --- a/bin/sdk/mount/nfs.sh +++ b/bin/sdk/mount/nfs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash require docker diff --git a/bin/sdk/runtime/wait.sh b/bin/sdk/runtime/wait.sh index c9953e56e..403df8a4f 100644 --- a/bin/sdk/runtime/wait.sh +++ b/bin/sdk/runtime/wait.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Runtime::waitFor() { local target=${1} diff --git a/bin/sentinels/autoload/autoload.sh b/bin/sentinels/autoload/autoload.sh index 5865320f3..912b1133a 100644 --- a/bin/sentinels/autoload/autoload.sh +++ b/bin/sentinels/autoload/autoload.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Sentinel::Autoload::install() { echo 1 diff --git a/bin/service/broker/rabbitmq.sh b/bin/service/broker/rabbitmq.sh index 4394521bd..2f396b2cf 100644 --- a/bin/service/broker/rabbitmq.sh +++ b/bin/service/broker/rabbitmq.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Service::Broker::install() { if ! Service::isServiceExist broker; then diff --git a/bin/service/database/mysql.sh b/bin/service/database/mysql.sh index 7283c1c59..c998d098f 100644 --- a/bin/service/database/mysql.sh +++ b/bin/service/database/mysql.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Database::checkConnection() { diff --git a/bin/service/database/postgres.sh b/bin/service/database/postgres.sh index 3fa3ad1e2..fb5369945 100644 --- a/bin/service/database/postgres.sh +++ b/bin/service/database/postgres.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Database::haveTables() { if ! Service::isServiceExist database; then diff --git a/bin/service/scheduler/jenkins.sh b/bin/service/scheduler/jenkins.sh index 321665c7f..c83f3cb5e 100644 --- a/bin/service/scheduler/jenkins.sh +++ b/bin/service/scheduler/jenkins.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Service::Scheduler::isInstalled() { if ! Service::isServiceExist scheduler; then diff --git a/bin/service/service.sh b/bin/service/service.sh index de6c9ba00..e521110b7 100755 --- a/bin/service/service.sh +++ b/bin/service/service.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function Service::isServiceExist() { local serviceName="${1}" diff --git a/bin/standalone/cli.sh b/bin/standalone/cli.sh index 76d9f654c..0666c38b9 100755 --- a/bin/standalone/cli.sh +++ b/bin/standalone/cli.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/bin/standalone/console.sh b/bin/standalone/console.sh index c3ac2c8bf..6aa9ec8e7 100755 --- a/bin/standalone/console.sh +++ b/bin/standalone/console.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash CONSOLE_STARTED="" diff --git a/bin/standalone/constants.sh b/bin/standalone/constants.sh index 270a1cd0f..91cf554f1 100755 --- a/bin/standalone/constants.sh +++ b/bin/standalone/constants.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # shellcheck disable=SC2034 TRUE=0 diff --git a/bin/standalone/logo/spryker-cli.sh b/bin/standalone/logo/spryker-cli.sh index accb48a46..80976981d 100755 --- a/bin/standalone/logo/spryker-cli.sh +++ b/bin/standalone/logo/spryker-cli.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # shellcheck disable=SC2164 pushd "${BASH_SOURCE%/*}" >/dev/null diff --git a/bin/standalone/logo/spryker-sdk.sh b/bin/standalone/logo/spryker-sdk.sh index 6690addde..27731ab9a 100755 --- a/bin/standalone/logo/spryker-sdk.sh +++ b/bin/standalone/logo/spryker-sdk.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # shellcheck disable=SC2164 pushd "${BASH_SOURCE%/*}" >/dev/null diff --git a/ci/tests.sh b/ci/tests.sh index ec4b87060..fe9144977 100644 --- a/ci/tests.sh +++ b/ci/tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -a diff --git a/ci/tests/registry/trap/chech-remove.case.sh b/ci/tests/registry/trap/chech-remove.case.sh index 70c1fd5ca..0d40f73ee 100644 --- a/ci/tests/registry/trap/chech-remove.case.sh +++ b/ci/tests/registry/trap/chech-remove.case.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source bin/framework.sh diff --git a/ci/tests/registry/trap/check-edge.case.sh b/ci/tests/registry/trap/check-edge.case.sh index 8312d6432..f5cc9dd79 100644 --- a/ci/tests/registry/trap/check-edge.case.sh +++ b/ci/tests/registry/trap/check-edge.case.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source bin/framework.sh diff --git a/ci/tests/registry/trap/check-on-exit.case.sh b/ci/tests/registry/trap/check-on-exit.case.sh index 6d8ae84ff..8c59406b1 100644 --- a/ci/tests/registry/trap/check-on-exit.case.sh +++ b/ci/tests/registry/trap/check-on-exit.case.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source bin/framework.sh diff --git a/ci/tests/registry/trap/check-release.case.sh b/ci/tests/registry/trap/check-release.case.sh index 99eb3963d..6d4002534 100644 --- a/ci/tests/registry/trap/check-release.case.sh +++ b/ci/tests/registry/trap/check-release.case.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source bin/framework.sh diff --git a/ci/tests/registry/trap/trap.test.sh b/ci/tests/registry/trap/trap.test.sh index 164fba0ee..ead31a8ba 100644 --- a/ci/tests/registry/trap/trap.test.sh +++ b/ci/tests/registry/trap/trap.test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -a diff --git a/context/jenkins/export/entrypoint.sh b/context/jenkins/export/entrypoint.sh index f44f00602..b2244c512 100644 --- a/context/jenkins/export/entrypoint.sh +++ b/context/jenkins/export/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash HOST=localhost PORT=8080 diff --git a/context/jenkins/spryker.sh b/context/jenkins/spryker.sh index f1c20b8a7..72a4d7e1a 100644 --- a/context/jenkins/spryker.sh +++ b/context/jenkins/spryker.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/generator/openssl/generate.sh b/generator/openssl/generate.sh index f1fb50753..a6de1e193 100644 --- a/generator/openssl/generate.sh +++ b/generator/openssl/generate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e id export ALT_NAMES=$(printf "DNS:%s" "${@/%/,}" | sed -r "s/,$//g") diff --git a/generator/src/templates/deploy.bash.twig b/generator/src/templates/deploy.bash.twig index ab90262fd..515b9cd5a 100644 --- a/generator/src/templates/deploy.bash.twig +++ b/generator/src/templates/deploy.bash.twig @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # shellcheck disable=SC2034 set -e diff --git a/sdk b/sdk index fb373761a..a8476d8a1 100755 --- a/sdk +++ b/sdk @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e