Commit 16e81d2c by Jeremy Kemper

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
...@@ -96,6 +96,10 @@ install_git() { ...@@ -96,6 +96,10 @@ install_git() {
install_package_using "git" 2 $* install_package_using "git" 2 $*
} }
install_svn() {
install_package_using "svn" 2 $*
}
install_package_using() { install_package_using() {
local package_type="$1" local package_type="$1"
local package_type_nargs="$2" local package_type_nargs="$2"
...@@ -159,6 +163,21 @@ fetch_git() { ...@@ -159,6 +163,21 @@ fetch_git() {
fi 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() { build_package() {
local package_name="$1" local package_name="$1"
shift shift
......
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz" 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
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz" 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment