Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/scripts/xinitrc
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/xinitrc
parent38b0ad32b152d31d61eb0a873d7d3de45926af03 (diff)
Test if config exists instead of creating it
Diffstat (limited to 'scripts/xinitrc')
-rw-r--r--scripts/xinitrc8
1 files changed, 3 insertions, 5 deletions
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.