2012-10-28 16:48:51 +00:00
|
|
|
#!/bin/bash
|
2012-10-30 21:49:04 +00:00
|
|
|
# download and unzip the sauce connector
|
2012-11-12 03:07:41 +00:00
|
|
|
curl http://saucelabs.com/downloads/Sauce-Connect-latest.zip > /tmp/sauce.zip
|
|
|
|
unzip /tmp/sauce.zip -d /tmp
|
2012-10-30 21:49:04 +00:00
|
|
|
|
|
|
|
# start the sauce connector in background and make sure it doesn't output the secret key
|
2013-06-06 16:58:06 +00:00
|
|
|
(java -jar /tmp/Sauce-Connect.jar $SAUCE_USER $SAUCE_ACCESS_KEY -f /tmp/tunnel > /dev/null )&
|
2012-10-30 21:49:04 +00:00
|
|
|
|
|
|
|
# save the sauce pid in a file
|
|
|
|
echo $! > /tmp/sauce.pid
|
|
|
|
|
|
|
|
# wait for the tunnel to build up
|
|
|
|
while [ ! -e "/tmp/tunnel" ]
|
|
|
|
do
|
|
|
|
sleep 1
|
2012-11-01 21:46:50 +00:00
|
|
|
done
|