forked from ungleich-public/cdist
use grep's -q option
This commit is contained in:
parent
34fa123ed1
commit
eb83190efd
3 changed files with 6 additions and 6 deletions
|
@ -28,10 +28,10 @@ if su - $user -c "[ ! -d \"\$HOME/.rvm\" ]" ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if su - $user -c "source \"\$HOME/.rvm/scripts/rvm\"
|
if su - $user -c "source \"\$HOME/.rvm/scripts/rvm\"
|
||||||
rvm list | grep $ruby > /dev/null"; then
|
rvm list | grep -q $ruby"; then
|
||||||
if su - $user -c "source \"\$HOME/.rvm/scripts/rvm\"
|
if su - $user -c "source \"\$HOME/.rvm/scripts/rvm\"
|
||||||
rvm use $ruby > /dev/null; rvm gemset list | grep $gemsetname > /dev/null &&
|
rvm use $ruby > /dev/null; rvm gemset list | grep -q $gemsetname &&
|
||||||
rvm use $gemset > /dev/null && gem list | grep $gem > /dev/null"; then
|
rvm use $gemset > /dev/null && gem list | grep -q $gem"; then
|
||||||
echo "installed"
|
echo "installed"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -27,9 +27,9 @@ if su - $user -c "[ ! -d \"\$HOME/.rvm\" ]" ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if su - $user -c "source \"\$HOME/.rvm/scripts/rvm\"
|
if su - $user -c "source \"\$HOME/.rvm/scripts/rvm\"
|
||||||
rvm list | grep $ruby > /dev/null"; then
|
rvm list | grep -q $ruby"; then
|
||||||
if su - $user -c "source \"\$HOME/.rvm/scripts/rvm\"
|
if su - $user -c "source \"\$HOME/.rvm/scripts/rvm\"
|
||||||
rvm use $ruby > /dev/null; rvm gemset list | grep $gemsetname > /dev/null"; then
|
rvm use $ruby > /dev/null; rvm gemset list | grep -q $gemsetname"; then
|
||||||
echo "installed"
|
echo "installed"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -25,7 +25,7 @@ if su - $user -c "[ ! -d \"\$HOME/.rvm\" ]" ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if su - $user -c "source \"\$HOME/.rvm/scripts/rvm\"
|
if su - $user -c "source \"\$HOME/.rvm/scripts/rvm\"
|
||||||
rvm list | grep $ruby >/dev/null"; then
|
rvm list | grep -q $ruby"; then
|
||||||
echo "installed"
|
echo "installed"
|
||||||
else
|
else
|
||||||
echo "removed"
|
echo "removed"
|
||||||
|
|
Loading…
Reference in a new issue