From d8ad168ecc27767aec4b315d0573a7697dd9e02b Mon Sep 17 00:00:00 2001 From: Marek Sebera Date: Sun, 29 May 2016 17:27:29 +0200 Subject: [PATCH 1/2] Update scripts to provide Developer Sandbox automatically --- .gitignore | 2 ++ run.sh | 11 +++++++++++ update.sh | 1 + update_wrapper.sh | 6 ++++++ 4 files changed, 20 insertions(+) create mode 100644 .gitignore create mode 100755 update_wrapper.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c5a8b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +latest +user-data-dir diff --git a/run.sh b/run.sh index 2d5f026..b2ffae4 100755 --- a/run.sh +++ b/run.sh @@ -2,4 +2,15 @@ BASEDIR=$(dirname $0) +export CHROME_DEVEL_SANDBOX=$BASEDIR/latest/chrome_sandbox + +# Uncomment these lines to get rid of API Keys missing warning +#export GOOGLE_API_KEY="no" +#export GOOGLE_DEFAULT_CLIENT_ID="no" +#export GOOGLE_DEFAULT_CLIENT_SECRET="no" + +# Use this if you want separate profile location $BASEDIR/latest/chrome --user-data-dir="$BASEDIR/user-data-dir" $* &> /dev/null & + +# Use this if you want to use standard profile location +# $BASEDIR/latest/chrome-wrapper $* &> /dev/null & diff --git a/update.sh b/update.sh index 6730185..0651cf1 100755 --- a/update.sh +++ b/update.sh @@ -29,3 +29,4 @@ popd rm -f ./latest ln -s $REVISION/chrome-linux/ ./latest +./update_wrapper.sh diff --git a/update_wrapper.sh b/update_wrapper.sh new file mode 100755 index 0000000..16d19b9 --- /dev/null +++ b/update_wrapper.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo "Chrome Wrapper Update" + +sudo chown root:root latest/chrome_sandbox +sudo chmod 4755 latest/chrome_sandbox From e310b1243a7eaba2fb82b84748e24db4eb0ce8bb Mon Sep 17 00:00:00 2001 From: Marek Sebera Date: Sun, 29 May 2016 17:49:20 +0200 Subject: [PATCH 2/2] resolving correct path when run.sh is symlinked to another directory --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index b2ffae4..c2e36b5 100755 --- a/run.sh +++ b/run.sh @@ -1,6 +1,6 @@ #! /bin/bash -BASEDIR=$(dirname $0) +BASEDIR=$(dirname $(realpath $0)) export CHROME_DEVEL_SANDBOX=$BASEDIR/latest/chrome_sandbox