bolt.new-any-llm/bindings.sh

17 lines
400 B
Bash
Raw Normal View History

2024-07-10 16:44:39 +00:00
#!/bin/bash
bindings=""
while IFS= read -r line || [ -n "$line" ]; do
if [[ ! "$line" =~ ^# ]] && [[ -n "$line" ]]; then
name=$(echo "$line" | cut -d '=' -f 1)
value=$(echo "$line" | cut -d '=' -f 2-)
value=$(echo $value | sed 's/^"\(.*\)"$/\1/')
bindings+="--binding ${name}=${value} "
fi
done < .env.local
bindings=$(echo $bindings | sed 's/[[:space:]]*$//')
echo $bindings