Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike@mikegerwitz.com>2011-10-02 15:19:41 -0400
committerMike Gerwitz <mike@mikegerwitz.com>2011-10-02 20:09:15 -0400
commit56175579def599f624d404c801046e424518d868 (patch)
treeef74b70c89c364adc63ce7e6f11bc6fc88ee6f53
parente82cf7c7109a93eff1be8738ef54958906c91f3a (diff)
downloadgsgp-56175579def599f624d404c801046e424518d868.tar.gz
gsgp-56175579def599f624d404c801046e424518d868.tar.bz2
gsgp-56175579def599f624d404c801046e424518d868.zip
Moved GSGP_PROFILE_PATH export to start script
-rwxr-xr-xstart8
-rw-r--r--test/common1
-rw-r--r--util/common15
3 files changed, 10 insertions, 14 deletions
diff --git a/start b/start
index bb5df55..e8615be 100755
--- a/start
+++ b/start
@@ -4,9 +4,15 @@
export GSGP_ID="$( cut -d' ' -f1 < TITLE )"
export GSGP_TITLE="$( cut -d' ' -f2- < TITLE )"
+# we'll provide the ability to specify the profile in the future
export GSGP_PROFILE=default
-opening_scene="$( dirname $0)/util/scene-runner start"
+# path to current profile
+export GSGP_PROFILE_PATH="$HOME/.$GSGP_ID/profiles/$GSGP_PROFILE"
+
+# create path in case it does not yet exist
+mkdir -p "$GSGP_PROFILE_PATH" 2>/dev/null
+opening_scene="$( dirname $0)/util/scene-runner start"
screen -c screenrc $opening_scene
diff --git a/test/common b/test/common
index 4d82645..3724971 100644
--- a/test/common
+++ b/test/common
@@ -4,6 +4,7 @@
export GSGP_ID=gsgptest
export GSGP_TITLE="Test Suite"
export GSGP_PROFILE=TEST
+export GSGP_PROFILE_PATH=/tmp/gsgp-test
. "$( dirname $0 )/../util/common"
diff --git a/util/common b/util/common
index af766eb..76b0795 100644
--- a/util/common
+++ b/util/common
@@ -1,18 +1,7 @@
#!/bin/bash
-if [ ! "$GSGP_ID" ]; then
- echo "ID unavailable" >&2
+if [ ! "$GSGP_PROFILE_PATH" ]; then
+ echo "ERROR: Profile path unavailable" >&2
exit 1
fi
-if [ ! "$GSGP_PROFILE" ]; then
- echo "Profile unavailable" >&2
- exit 2
-fi
-
-# path to current profile
-export GSGP_PROFILE_PATH="$HOME/.$GSGP_ID/profiles/$GSGP_PROFILE"
-
-# create path in case it does not yet exist
-mkdir -p "$GSGP_PROFILE_PATH" 2>/dev/null
-