Skip to content
Browse files

added build function using svn

  • Loading branch information...
1 parent 8b6697c commit 88aaff54e4b1f01c501e65c011aaa787ac2b7118 @hsbt committed Oct 6, 2012
Showing with 19 additions and 0 deletions.
  1. +19 −0 bin/ruby-build
View
19 bin/ruby-build
@@ -96,6 +96,10 @@ install_git() {
install_package_using "git" 2 $*
}
+install_svn() {
+ install_package_using "svn" 2 $*
+}
+
install_package_using() {
local package_type="$1"
local package_type_nargs="$2"
@@ -159,6 +163,21 @@ fetch_git() {
fi
}
+fetch_svn() {
+ local package_name="$1"
+ local svn_url="$2"
+ local svn_rev="$3"
+
+ echo "Checkout ${svn_url}..." >&2
+
+ if type svn &>/dev/null; then
+ svn co -r "$svn_rev" "$svn_url" "${package_name}" >&4 2>&1
+ else
+ echo "error: please install \`svn\` and try again" >&2
+ exit 1
+ fi
+}
+
build_package() {
local package_name="$1"
shift

0 comments on commit 88aaff5

Please sign in to comment.
Something went wrong with that request. Please try again.