From 0d5a47a1b631043b0430125c82cfa1cf312b16cd Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 14 May 2014 01:02:16 +0200 Subject: spawn terminal from test mdsinitrc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- test | 1 + test.d/mdsinitrc | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/test b/test index 0529ee6..09dd95d 100755 --- a/test +++ b/test @@ -15,6 +15,7 @@ elif [ ! "$(cat /usr/local/lib/libmdsserver.so | sha256sum)" = "$(cat bin/libmds sudo cp bin/libmdsserver.so /usr/local/lib/libmdsserver.so fi +export OLD_XDG_CONFIG_HOME="${XDG_CONFIG_HOME}" export PATH="$(pwd)/test.d:${PATH}" export XDG_CONFIG_HOME="$(pwd)/test.d" diff --git a/test.d/mdsinitrc b/test.d/mdsinitrc index f010fb7..ca28224 100755 --- a/test.d/mdsinitrc +++ b/test.d/mdsinitrc @@ -2,3 +2,15 @@ echo "Successfully spawned mdsinitrc. " + +export XDG_CONFIG_HOME="${OLD_XDG_CONFIG_HOME}" +unset OLD_XDG_CONFIG_HOME +if [ -z "${XDG_CONFIG_HOME}" ]; then + unset XDG_CONFIG_HOME +fi +if which terminator 2>/dev/null >&2; then + exec terminator +else + exec xterm +fi + -- cgit v1.2.3-70-g09d2