Files
5903b5d4a8 chore: prepare examples for cli bootstrap (#22428)
* chore: prep expo example.

* Modify Flutter user management example to use .env and initialize supabase

* chore: add .env support to swift-user-management

* chore: update supabase dependency for swift-user-management example

* chore: minor expo updates.

* chore: update auth nextjs example.

---------

Co-authored-by: dshukertjr <dshukertjr@gmail.com>
Co-authored-by: Guilherme Souza <grsouza@pm.me>
2024-04-05 17:26:36 +08:00

17 lines
423 B
Bash
Executable File

#!/usr/bin/env bash
env_file="${1:-.env}"
if [[ -f "$env_file" ]]; then
echo "enum DotEnv {"
while IFS='=' read -r key value || [[ -n "$key" ]]; do
if [[ -n "$key" && ! "$key" =~ ^# ]]; then
if [[ -z "$value" ]]; then
value=$(eval "echo \$$key")
fi
echo " static let $key = \"$value\""
fi
done < <(grep -v '^#' "$env_file")
echo "}"
fi