Skip to content

Instantly share code, notes, and snippets.

@ayr-ton
Forked from mihow/load_dotenv.sh
Last active April 4, 2022 18:08
Show Gist options
  • Save ayr-ton/a607f5d38b7e3a7233fbd1386a6611aa to your computer and use it in GitHub Desktop.
Save ayr-ton/a607f5d38b7e3a7233fbd1386a6611aa to your computer and use it in GitHub Desktop.

Revisions

  1. ayr-ton revised this gist Apr 4, 2022. 1 changed file with 9 additions and 4 deletions.
    13 changes: 9 additions & 4 deletions load_dotenv.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,9 @@
    if [ ! -f .env ]
    then
    export $(cat .env | xargs)
    fi
    function load-env() {
    if [ -e .env ]
    then
    export $(cat .env | xargs)
    echo ".env exported with success! 🥄"
    else
    echo "There's no spoon 🐲"
    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