Skip to content

Instantly share code, notes, and snippets.

@dblooman
Created June 2, 2014 14:30
Show Gist options
  • Select an option

  • Save dblooman/686e9499c9d23e373876 to your computer and use it in GitHub Desktop.

Select an option

Save dblooman/686e9499c9d23e373876 to your computer and use it in GitHub Desktop.
bsshell
#!/bin/bash
if [[ "$1" == "stop" ]]
then
echo "Stopping browserstack tunnel..."
killall BrowserStackLocal
exit
fi
if [[ ! -e browserstack ]]
then
echo "Downloading browserstack tunnel..."
mkdir -p browserstack
curl https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip > browserstack/BrowserStackLocal-linux-x64.zip
cd browserstack && unzip BrowserStackLocal-linux-x64.zip && chmod a+x BrowserStackLocal
cd ..
fi
echo "Browserstack tunnel ready..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment