Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-08-02 17:32:18 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-08-02 17:32:18 (GMT)
commitb94013a5e78aedbb537e1ffe43e5b41e98e6ad62 (patch)
tree1c0ec10d5ba28a6acb9d7d144822c3ba02b28de6 /scripts
parent38b0ad32b152d31d61eb0a873d7d3de45926af03 (diff)
Test if config exists instead of creating it
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run-dogtail-tests2
-rwxr-xr-xscripts/shell/start-sugar2
-rw-r--r--scripts/xinitrc8
3 files changed, 5 insertions, 7 deletions
diff --git a/scripts/run-dogtail-tests b/scripts/run-dogtail-tests
index 7bd2d12..800eb8a 100755
--- a/scripts/run-dogtail-tests
+++ b/scripts/run-dogtail-tests
@@ -8,7 +8,7 @@ logsdir=$rootdir/logs
display=`$scriptsdir/find-free-display`
resolution=1024x768x16
-if [ -z $rootdir/config ]; then
+if [ -f $rootdir/config ]; then
source $rootdir/config
fi
diff --git a/scripts/shell/start-sugar b/scripts/shell/start-sugar
index 70efdd2..2c8c186 100755
--- a/scripts/shell/start-sugar
+++ b/scripts/shell/start-sugar
@@ -5,7 +5,7 @@ scriptsdir=`dirname "$shelldir"`
rootdir=`dirname "$scriptsdir"`
display=`$scriptsdir/find-free-display`
-if [ -z $rootdir/config ]; then
+if [ -f $rootdir/config ]; then
source $rootdir/config
fi
diff --git a/scripts/xinitrc b/scripts/xinitrc
index 1d221e4..b433aa9 100644
--- a/scripts/xinitrc
+++ b/scripts/xinitrc
@@ -8,10 +8,6 @@ SCRIPTS_DIR=`dirname "$0"`
ROOT_DIR=`dirname "$SCRIPTS_DIR"`
test -z "$ROOT_DIR" && $ROOT_DIR=.
-if [ ! -f $ROOT_DIR/config ]; then
- touch $ROOT_DIR/config
-fi
-
if [ ! -z $SUGAR_PROFILE ]; then
grep -q PROFILE $ROOT_DIR/config
if [ $? -eq 1 ]; then
@@ -20,7 +16,9 @@ if [ ! -z $SUGAR_PROFILE ]; then
fi
fi
-source $ROOT_DIR/config
+if [ -f $ROOT_DIR/config ]; then
+ source $ROOT_DIR/config
+fi
# Sugar doesn't handle multiple outputs properly. To avoid issues we keep the
# first output in the list returned by xrandr and turn off everything else.