Commit 88aaff54 by SHIBATA Hiroshi

added build function using svn

parent 8b6697c8
...@@ -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 "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() { build_package() {
local package_name="$1" local package_name="$1"
shift shift
......
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