mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-01-01 14:44:48 +01:00
Add --verbose and --resume options
This commit is contained in:
parent
b5cc9ffb8b
commit
97a48518e5
1 changed files with 31 additions and 2 deletions
|
@ -23,12 +23,38 @@ abs_dirname() {
|
||||||
cd "$cwd"
|
cd "$cwd"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "usage: ruby-package [-v | --verbose] [--resume] DEFINITION"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
bin_root="$(abs_dirname "$0")"
|
bin_root="$(abs_dirname "$0")"
|
||||||
|
|
||||||
|
verbose=""
|
||||||
|
resume=""
|
||||||
|
|
||||||
|
while :; do
|
||||||
|
case "$1" in
|
||||||
|
"-v" | "--verbose" )
|
||||||
|
verbose="-v"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
"--resume" )
|
||||||
|
resume=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
"-"* )
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
definition="$1"
|
definition="$1"
|
||||||
if [ -z "$definition" ]; then
|
if [ -z "$definition" ]; then
|
||||||
echo "usage: ruby-package DEFINITION"
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
package="${definition##*/}"
|
package="${definition##*/}"
|
||||||
|
@ -36,7 +62,10 @@ prefix="/tmp/ruby-build/--------------------------------------------------------
|
||||||
|
|
||||||
package_dir="${package}.$(package_platform)"
|
package_dir="${package}.$(package_platform)"
|
||||||
|
|
||||||
"${bin_root}/ruby-build" -v "$definition" "$prefix"
|
if [ -z "$resume" ]; then
|
||||||
|
"${bin_root}/ruby-build" $verbose "$definition" "$prefix"
|
||||||
|
fi
|
||||||
|
|
||||||
cwd="$(pwd)"
|
cwd="$(pwd)"
|
||||||
cd "${prefix}/.."
|
cd "${prefix}/.."
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue