]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - setup.sh
setup.sh: Use test instead of [.
[config/dotfiles.git] / setup.sh
index c2a56d574475118bd5a32b8545609ca3c45e9c38..aa323acd2be93d457c4ca26b8fd921fe11d64394 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -83,14 +83,14 @@ 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
 fi
 # I use some features of screen which are only in Git. Drop them on machines
 # which have older versions. They are marked as "(GIT)".
-if [ $hostname != asp -o x`id -u` = x0 ]; then
+if test -d "$HOME/development/shell/screen"; then
     echo screenrc: removing Git features
     grep -v '(GIT)' 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