Skip to content

Commit

Permalink
Add summary lines for rbenv install and rbenv uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
sstephenson committed Dec 30, 2012
1 parent 9e49bc5 commit b9474ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bin/rbenv-install
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
#
# Summary: Install a Ruby version using the ruby-build plugin
#
# Usage: rbenv install [-k|--keep] [-v|--verbose] <version>
# rbenv install [-k|--keep] [-v|--verbose] /path/to/definition
# rbenv install -l|--list
Expand All @@ -26,7 +28,7 @@ eval "$(ruby-build --lib)"

usage() {
# We can remove the sed fallback once rbenv 0.4.0 is widely available.
rbenv-help install 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,2d;p' < "$0"
rbenv-help install 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$0"
[ -z "$1" ] || exit "$1"
}

Expand Down
4 changes: 3 additions & 1 deletion bin/rbenv-uninstall
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
#
# Summary: Uninstall a specific Ruby version
#
# Usage: rbenv uninstall [-f] <version>
#
# -f Attempt to remove the specified version without prompting
Expand Down Expand Up @@ -30,7 +32,7 @@ case "$DEFINITION" in
"" | -* )
# We can remove the sed fallback once rbenv 0.4.0 is widely available.
{ rbenv-help uninstall 2>/dev/null ||
sed -ne '/^#/!q;s/.\{1,2\}//;1,2d;p' < "$0"
sed -ne '/^#/!q;s/.\{1,2\}//;1,4d;p' < "$0"
} >&2
exit 1
;;
Expand Down

0 comments on commit b9474ae

Please sign in to comment.