Created
July 19, 2017 20:07
-
-
Save jeystaats/1f11e8a896694cfd5663cce187520a20 to your computer and use it in GitHub Desktop.
Valet URL to .env file automatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export var=`valet fetch-share-url` | |
sed -i -e "s@.*APP_URL.*@APP_URL=$var@" $result | |
echo "💪 - Valet share URL has been replaced 📋 " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Easily make this an alias profile by adding this to your bash profile
Add to the bash profile the alias as following ( this has to redirect to where you have saved this valet-fetch script (!)
Save the nano by pressing
ctrl+x
, pressY
and thenEnter
Reload the bash file
Now you can use it after you ran valet share by running the commandname