]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
setup.sh: Fix ls color detection.
authorSimon Ruderich <simon@ruderich.org>
Tue, 12 Mar 2013 17:20:11 +0000 (18:20 +0100)
committerSimon Ruderich <simon@ruderich.org>
Tue, 12 Mar 2013 17:20:11 +0000 (18:20 +0100)
Broken with set -e change in aa9db4c1b656eab6774b5ae1ade7c6f8bb13a01f.

setup.sh

index 6bede115a519091e3d1c2c1e24cb57f8a19b5b4e..538663d3cee39a13af4eba7e818bd2ee93ea3d22 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -69,12 +69,10 @@ chmod 0600 ~/.less
 # speeds up shell starts.
 #
 # Check if colors are available.
-ls --color > /dev/null 2>&1
-if test $? -eq 0; then
+if ls --color > /dev/null 2>&1; then
     ls_color=gnu
 else
-    ls -G > /dev/null 2>&1
-    if test $? -eq 0; then
+    if ls -G > /dev/null 2>&1; then
         ls_color=cli
     else
         ls_color=