From b94013a5e78aedbb537e1ffe43e5b41e98e6ad62 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Thu, 02 Aug 2012 17:32:18 +0000 Subject: Test if config exists instead of creating it --- (limited to 'scripts') 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. -- cgit v0.9.1