clean up some syntax

This commit is contained in:
David Alexander Majnemer 2009-01-14 22:15:09 -05:00
parent e47c7b134a
commit 931df3e022
5 changed files with 18 additions and 30 deletions

View file

@ -20,7 +20,7 @@ fix_term ()
fix_term screen-256colors fix_term screen-256colors
;; ;;
screen-256colors) screen-256colors)
if (infocmp xterm-256colors &> /dev/null) ; then if ( infocmp xterm-256colors >/dev/null 2>&1 ) ; then
fix_term xterm-256colors fix_term xterm-256colors
else else
fix_term screen fix_term screen
@ -74,7 +74,6 @@ export TERM
case $TERM in case $TERM in
*256*) *256*)
SCREEN_TERM=$(fix_term screen-256color-bce) alias screen="screen -T `fix_term screen-256color-bce`"
alias screen="screen -T ${SCREEN_TERM}"
;; ;;
esac esac

View file

@ -39,27 +39,16 @@ case `uname -s` in
SunOS) SunOS)
if ( command -v gls >/dev/null 2>&1 ) ; then if ( command -v gls >/dev/null 2>&1 ) ; then
alias ls="gls -h --color=auto" alias ls="gls -h --color=auto"
else elif ( ls --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then
# you have a GNU ls, surprise...
case `ls --version 2>/dev/null | head -n 1` in
*fileutils*|*coreutils*)
alias ls="ls -h --color=auto" alias ls="ls -h --color=auto"
;; else
*)
alias ls="ls -h" alias ls="ls -h"
;;
esac
fi fi
if ( command -v ggrep >/dev/null 2>&1 ) ; then if ( command -v ggrep >/dev/null 2>&1 ) ; then
alias grep='ggrep -d skip --color=auto' alias grep='ggrep -d skip --color=auto'
else elif ( grep --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then
# woah, you have a GNU grep...
case `grep --version 2>/dev/null | head -n 1` in
*GNU*)
alias grep='grep -d skip --color=auto' alias grep='grep -d skip --color=auto'
;;
esac
fi fi
for locate in glocate slocate ; do for locate in glocate slocate ; do

2
lock
View file

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
if [[ `uname -s` = 'Darwin' ]] ; then if [ `uname -s` = 'Darwin' ] ; then
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine
exit exit
fi fi