Skip to content

Commit

Permalink
fixing #16 (more)
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Schrammel committed May 21, 2014
1 parent 94f26e9 commit 6988c6c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions etc/rbenv.d/exec/rbenv-binstubs.bash
Expand Up @@ -12,7 +12,8 @@ add_to_bundles ()
# update the list of bundles to remove any stale ones
local new_bundle
new_bundle=true
: > ${RBENV_ROOT}/bundles.new
new_bundles=${RBENV_ROOT}/bundles.new.$$
: > $new_bundles
if [ -s ${RBENV_ROOT}/bundles ]; then
OLDIFS="${IFS-$' \t\n'}"
IFS=$'\n' bundles=(`cat ${RBENV_ROOT}/bundles`)
Expand All @@ -22,17 +23,17 @@ add_to_bundles ()
new_bundle=false
fi
if [ -f "$bundle/Gemfile" ]; then
echo "$bundle" >> ${RBENV_ROOT}/bundles.new
echo "$bundle" >> $new_bundles
fi
done
fi
if [ "$new_bundle" = "true" ]; then
# add the given path to the list of bundles
if [ -f "$root/Gemfile" ]; then
echo "$root" >> ${RBENV_ROOT}/bundles.new
echo "$root" >> $new_bundles
fi
fi
mv -f ${RBENV_ROOT}/bundles.new ${RBENV_ROOT}/bundles
mv -f $new_bundles ${RBENV_ROOT}/bundles
}

if [ -z "$DISABLE_BINSTUBS" -a "X$1" = "Xbundle" ]; then
Expand Down

0 comments on commit 6988c6c

Please sign in to comment.