Skip to content

Instantly share code, notes, and snippets.

@LukasTsunami
Last active September 5, 2018 18:06
Show Gist options
  • Save LukasTsunami/648c34633c5277c4324cfa5a499f9753 to your computer and use it in GitHub Desktop.
Save LukasTsunami/648c34633c5277c4324cfa5a499f9753 to your computer and use it in GitHub Desktop.
docker abrir navegador
#!/bin/bash
port=8080
url="http://localhost:$port"
echo abrindo a aplicação no navegador
# se o s.o. for linux
if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
xdg-open "$url"
# se o s.o. for windows 32 bits
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
start "$url"
# se o s.o. for windows 64 bits
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then
start "$url"
else
echo url para acessar a aplicação "$url"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment