Skip to content

Instantly share code, notes, and snippets.

@joseluisq
Forked from mihow/load_dotenv.sh
Last active February 25, 2020 10:55
Show Gist options
  • Select an option

  • Save joseluisq/ffd42d8d9b9e33cba509b689411b5662 to your computer and use it in GitHub Desktop.

Select an option

Save joseluisq/ffd42d8d9b9e33cba509b689411b5662 to your computer and use it in GitHub Desktop.

Revisions

  1. joseluisq revised this gist Feb 25, 2020. 2 changed files with 10 additions and 4 deletions.
    10 changes: 10 additions & 0 deletions dotenv.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/usr/bin/env bash

    set -e
    set -u

    if [ -f .env ]; then
    export $(cat .env | xargs)
    else
    echo ".env file not found"
    fi
    4 changes: 0 additions & 4 deletions load_dotenv.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +0,0 @@
    if [ ! -f .env ]
    then
    export $(cat .env | xargs)
    fi
  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