Author: danielsh
Date: Sat Jun 25 20:00:09 2011
New Revision: 1139607
URL: http://svn.apache.org/viewvc?rev=1139607&view=rev
Log:
* get-deps.sh: Allow fetching only some dependencies.
Modified:
subversion/trunk/get-deps.sh
Modified: subversion/trunk/get-deps.sh
URL:
http://svn.apache.org/viewvc/subversion/trunk/get-deps.sh?rev=1139607&r1=1139606&r2=1139607&view=diff
==============================================================================
--- subversion/trunk/get-deps.sh (original)
+++ subversion/trunk/get-deps.sh Sat Jun 25 20:00:09 2011
@@ -46,6 +46,14 @@ HTTP_FETCH=
# be downloaded are no longer available on the general mirrors.
APACHE_MIRROR=http://archive.apache.org/dist
+# helpers
+usage() {
+ echo "Usage: $0"
+ echo "Usage: $0 [ apr | neon | serf | zlib | sqlite ] ..."
+ return $1
+}
+
+# getters
get_apr() {
cd $TEMPDIR
$HTTP_FETCH $APACHE_MIRROR/apr/$APR.tar.bz2
@@ -100,6 +108,7 @@ get_sqlite() {
}
+# main()
get_deps() {
mkdir -p $TEMPDIR
@@ -109,21 +118,27 @@ get_deps() {
fi
done
- get_apr
- get_neon
- get_serf
- get_zlib
- get_sqlite
-
- echo
- echo "If you require mod_dav_svn, the recommended version of httpd is:"
- echo " $APACHE_MIRROR/httpd/$HTTPD.tar.bz2"
-
- echo
- echo "If you require apr-iconv, its recommended version is:"
- echo " $APACHE_MIRROR/apr/$APR_ICONV.tar.bz2"
+ if [ $# -gt 0 ]; then
+ for target; do
+ get_$target || usage
+ done
+ else
+ get_apr
+ get_neon
+ get_serf
+ get_zlib
+ get_sqlite
+
+ echo
+ echo "If you require mod_dav_svn, the recommended version of httpd is:"
+ echo " $APACHE_MIRROR/httpd/$HTTPD.tar.bz2"
+
+ echo
+ echo "If you require apr-iconv, its recommended version is:"
+ echo " $APACHE_MIRROR/apr/$APR_ICONV.tar.bz2"
+ fi
rm -rf $TEMPDIR
}
-get_deps
+get_deps "$@"