Make gshuf alias checker work on other bash versions

pull/72/merge
Mark Szymanski 2011-08-12 16:30:55 -05:00
parent 576434048b
commit ba8fde85eb
2 changed files with 4 additions and 3 deletions

View File

@ -14,8 +14,8 @@ if [ $(uname) = "Linux" ]
then then
alias ls="ls --color=always" alias ls="ls --color=always"
fi fi
which gshuf &> /dev/null
if [ ! -z "$(which gshuf)" ] if [ $? -eq 1 ]
then then
alias shuf=gshuf alias shuf=gshuf
fi fi

View File

@ -16,7 +16,8 @@ function myip {
} }
pass() { pass() {
if [ -z "$(which gshuf)" ] which gshuf &> /dev/null
if [ $? -eq 1 ]
then then
echo "Error: shuf isn't installed!" echo "Error: shuf isn't installed!"
return 1 return 1