first commit
This commit is contained in:
23
scripts/bootstrap_validation_env.sh
Normal file
23
scripts/bootstrap_validation_env.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
SOURCE_FILE="${ROOT_DIR}/scripts/.env.validation.example"
|
||||
TARGET_FILE="${1:-}"
|
||||
|
||||
if [[ -z "${TARGET_FILE}" ]]; then
|
||||
echo "Usage: bash scripts/bootstrap_validation_env.sh <target-env-file>"
|
||||
echo "Example: bash scripts/bootstrap_validation_env.sh /tmp/mkt.validation.env"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -f "${TARGET_FILE}" ]]; then
|
||||
echo "Target file already exists: ${TARGET_FILE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp "${SOURCE_FILE}" "${TARGET_FILE}"
|
||||
|
||||
echo "Created validation env template:"
|
||||
echo " ${TARGET_FILE}"
|
||||
Reference in New Issue
Block a user