Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
0d7a0515
Commit
0d7a0515
authored
Feb 04, 2013
by
Adam Stankiewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Autoclean on unsuccessful installation
parent
a6395eb2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
+12
-1
bin/rbenv-install
+12
-1
No files found.
bin/rbenv-install
View file @
0d7a0515
...
@@ -135,6 +135,13 @@ fi
...
@@ -135,6 +135,13 @@ fi
# Execute `before_install` hooks.
# Execute `before_install` hooks.
for
hook
in
"
${
before_hooks
[@]
}
"
;
do
eval
"
$hook
"
;
done
for
hook
in
"
${
before_hooks
[@]
}
"
;
do
eval
"
$hook
"
;
done
# Plan cleanup on unsuccessful installation.
cleanup
()
{
rm
-rf
"
$PREFIX
"
}
trap
cleanup SIGINT
# Invoke `ruby-build` and record the exit status in $STATUS. Run
# Invoke `ruby-build` and record the exit status in $STATUS. Run
# `rbenv rehash` after a successful installation.
# `rbenv rehash` after a successful installation.
STATUS
=
0
STATUS
=
0
...
@@ -144,6 +151,10 @@ ruby-build $KEEP $VERBOSE "$DEFINITION" "$PREFIX" || STATUS="$?"
...
@@ -144,6 +151,10 @@ ruby-build $KEEP $VERBOSE "$DEFINITION" "$PREFIX" || STATUS="$?"
for
hook
in
"
${
after_hooks
[@]
}
"
;
do
eval
"
$hook
"
;
done
for
hook
in
"
${
after_hooks
[@]
}
"
;
do
eval
"
$hook
"
;
done
# Run `rbenv-rehash` after a successful installation.
# Run `rbenv-rehash` after a successful installation.
[
"
$STATUS
"
!=
"0"
]
||
rbenv rehash
if
[
"
$STATUS
"
==
"0"
]
;
then
rbenv rehash
else
cleanup
fi
exit
"
$STATUS
"
exit
"
$STATUS
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment