GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — codinit-dev/bindings.sh at main · ptmcode/codinit-dev Expand file tree/ Copy pathbindings.shMore file actions executable file ·33 lines (28 loc) · 913 Bytes / Copy pathbindings.shFile metadata and controlsexecutable file ·33 lines (28 loc) · 913 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 #!/bin/bash bindings="" # Function to extract variable names from the TypeScript interface extract_env_vars() { grep -o '[A-Z_]\+:' worker-configuration.d.ts | sed 's/://' } # First try to read from .env.local if it exists if [ -f ".env.local" ]; then 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="${value//\"/}" bindings+="--binding ${name}=${value} " fi done < .env.local else # If .env.local doesn't exist, use environment variables defined in .d.ts mapfile -t env_vars < <(extract_env_vars) # Generate bindings for each environment variable if it exists for var in "${env_vars[@]}"; do if [ -n "${!var}" ]; then bindings+="--binding ${var}=${!var} " fi done fi bindings="${bindings%% }" echo "$bindings" |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |