This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# common.sh - Shared functions for taskfile scripts | |
# Load environment variables from .env file if it exists | |
load_env() { | |
local env_file="${1:-.env}" | |
if [[ -f "${env_file}" ]]; then | |
echo "Loading environment from ${env_file}" | |
# Export variables from .env, ignoring comments and empty lines | |
set -o allexport |