From 2912e4f5ff445e2e0417808fcdd92ccd9e379045 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Mon, 4 Jan 2010 20:48:12 +0800 Subject: The sandbox/ directory is created when any sandbox make target is run. --- misc/env.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 misc/env.sh (limited to 'misc') diff --git a/misc/env.sh b/misc/env.sh new file mode 100755 index 0000000..4eec525 --- /dev/null +++ b/misc/env.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# This script is copied in to the sandbox/ directory during any sandbox make +# target and is used to create an isolated environment for uzbl-core, +# uzbl-browser and uzbl-tabbed to be run and tested. + +# It would be better to use something more flexible like $(dirname $0) but I +# couldn't get to work nicely from the Makefile: +# - Sourcing file gives $0 == /bin/sh +# - Executing limits scope of variables too much (even with exporting) +# Maybe we should spawn processes from here with an 'exec' at the end? + +# Re-define our home location inside the sandbox dir. +export HOME=./sandbox/home + +# Export default XDG_{DATA,CACHE,..}_HOME locations inside the sandbox +# directory according to defaults in the xdg specification. +# +export XDG_DATA_HOME=$HOME/.local/share +export XDG_CACHE_HOME=$HOME/.cache +export XDG_CONFIG_HOME=$HOME/.config + +# Now update the path to include our sandbox bin directory. +export PATH="./sandbox/usr/local/bin:$PATH" -- cgit v1.2.3