Use bash built-in 'test' command.
--- a/.bashrc Tue Nov 08 16:00:08 2011 +0200
+++ b/.bashrc Tue Nov 08 23:20:39 2011 +0200
@@ -3,7 +3,7 @@
# set -u
# XXX
-# [ -f /etc/bashrc ] && . /etc/bashrc
+# [[ -f /etc/bashrc ]] && . /etc/bashrc
# XXX for mc, cvs, svn, ...
export EDITOR=vim
@@ -21,7 +21,7 @@
;;
esac
-# if [ -f ~/.dircolors ]; then
+# if [[ -f ~/.dircolors ]]; then
# eval `dircolors -b ~/.dircolors`
# fi
@@ -125,7 +125,7 @@
# Special case for CYGWIN to properly display russian letters in rxvt.
# Don't forget set in Windows SHELL=/bin/bash. If default SHELL is sh then .bashrc will not be read.
-if [ x$OSTYPE = xcygwin ]; then
+if [[ x$OSTYPE = xcygwin ]]; then
export LANG=ru_RU.CP1251
# Avoid permission problem in Cygwin.
umask 0000
@@ -133,13 +133,13 @@
export PATH=$PATH:~/usr/bin
-if [ -z "$MANPATH" ]; then
+if [[ -z "$MANPATH" ]]; then
export MANPATH=~/usr/share/man:
else
export MANPATH=$MANPATH:~/usr/share/man:
fi
-if [ -z "$INFOPATH" ]; then
+if [[ -z "$INFOPATH" ]]; then
export INFOPATH=~/usr/share/info:
else
export INFOPATH=$INFOPATH:~/usr/share/info: