Created
July 7, 2022 13:47
-
-
Save jr-k/cc63363ea6a8a608d6e2c1a0f04baefb to your computer and use it in GitHub Desktop.
Replace private IP of .env file by your computer's one
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 | |
ip=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | grep 192.168 | cut -d\ -f2) | |
sed -E -i '' "s/192.168.[0-9][0-9]?[0-9]?.[0-9][0-9]?[0-9]?/$ip/g" contentplayer-mobile/.env | |
echo "👻 Updated ip address on env file : $ip" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment