From 90691ed2f737abfe5e591e7971501a60fa72ac9c Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 15 Oct 2012 21:04:34 +0200 Subject: [PATCH] setup.sh: Use test instead of [. Also fix a comparison, `id -u` is a number. --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 305c093..aa323ac 100755 --- a/setup.sh +++ b/setup.sh @@ -83,7 +83,7 @@ if test -z "$use_256colors"; then fi # Some options are only necessary when running as root. They are marked as # "(ROOT)". -if [ x`id -u` != x0 ]; then +if test "`id -u`" -ne 0; then echo screenrc: removing root options grep -v '(ROOT)' screenrc > screenrc.tmp mv screenrc.tmp screenrc @@ -104,7 +104,7 @@ if installed rxvt; then fi # Display current battery charge on computers with a battery. Necessary lines # are marked as "(BATTERY)". -if [ ! -d /sys/class/power_supply/BAT0 ]; then +if test ! -d /sys/class/power_supply/BAT0; then echo screenrc: removing battery display grep -v '(BATTERY)' screenrc > screenrc.tmp mv screenrc.tmp screenrc -- 2.45.2