Allow init arguments to be in any order.

This commit is contained in:
John Williams 2012-01-17 08:50:40 -06:00
parent 5d0a6630b9
commit f40bc773d2

View file

@ -3,16 +3,19 @@ set -e
[ -n "$RBENV_DEBUG" ] && set -x
print=""
if [ "$1" = "-" ]; then
no_rehash=""
for args in "$@"
do
if [ "$args" = "-" ]; then
print=1
shift
fi
fi
no_rehash=""
if [ "$1" = "--no-rehash" ]; then
if [ "$args" = "--no-rehash" ]; then
no_rehash=1
shift
fi
fi
done
shell="$1"
if [ -z "$shell" ]; then