Yimaru-BackEnd/load_env.sh
2025-03-29 06:25:19 +03:00

16 lines
283 B
Bash

#!/bin/bash
dotenv() {
if [ -f .env ]; then
while IFS='=' read -r key value; do
if [[ ! -z "$key" && "$key" != \#* ]]; then
export "$key=$value"
fi
done < .env
else
echo ".env file not found."
fi
}
dotenv