Commit 16e81d2c authored by Jeremy Kemper's avatar Jeremy Kemper
Browse files

Merge pull request #217 from hsbt/add-install_svn

Support install & build from Subversion repositories. Switch 1.9.3-dev and 2.0.0-dev to svn since the git mirror is no longer maintained.
parents 8b6697c8 28b81a02
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -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 "Checking out ${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
+1 −1
Original line number Diff line number Diff line
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
install_git "ruby-1.9.3-dev" "https://github.com/ruby/ruby.git" "ruby_1_9_3" autoconf standard
install_svn "ruby-1.9.3-dev" "http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_3" "HEAD" autoconf standard
+1 −1
Original line number Diff line number Diff line
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
install_git "ruby-2.0.0-dev" "https://github.com/ruby/ruby.git" "trunk" autoconf standard
install_svn "ruby-2.0.0-dev" "http://svn.ruby-lang.org/repos/ruby/trunk" "HEAD" autoconf standard
 No newline at end of file