Skip to content

Instantly share code, notes, and snippets.

@cicorias
Forked from mihow/load_dotenv.sh
Last active February 15, 2022 14:56
Show Gist options
  • Save cicorias/9bc1cebe666c9dba7aa3679c1381f8bf to your computer and use it in GitHub Desktop.
Save cicorias/9bc1cebe666c9dba7aa3679c1381f8bf to your computer and use it in GitHub Desktop.

Revisions

  1. cicorias revised this gist Feb 15, 2022. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion load_dotenv.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,11 @@
    if [ ! -f .env ]
    then
    export $(cat .env | xargs)
    fi
    fi


    # or

    set -o allexport
    source .env
    set +o allexport
  2. @mihow mihow renamed this gist Jan 24, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @mihow mihow created this gist Jan 24, 2017.
    4 changes: 4 additions & 0 deletions runserver.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    if [ ! -f .env ]
    then
    export $(cat .env | xargs)
    fi