aboutsummaryrefslogtreecommitdiffstats
path: root/build_rsync.sh
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-02-20 10:16:58 +0200
committerFilipp Lepalaan <filipp@mac.com>2010-02-20 10:16:58 +0200
commit25500ceb5032cb227036696e25b21e33e9494d61 (patch)
tree716dbfcc170e71e03cabff8db2cb650e123f35a4 /build_rsync.sh
downloadmtk-25500ceb5032cb227036696e25b21e33e9494d61.tar.gz
mtk-25500ceb5032cb227036696e25b21e33e9494d61.tar.bz2
mtk-25500ceb5032cb227036696e25b21e33e9494d61.zip
First commit
Diffstat (limited to 'build_rsync.sh')
-rwxr-xr-xbuild_rsync.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/build_rsync.sh b/build_rsync.sh
new file mode 100755
index 0000000..5f28dab
--- /dev/null
+++ b/build_rsync.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+# build_rsync.sh
+# @author Filipp Lepalaan <filipp@mcare.fi>
+# Build the most recent version of rsync
+# with necessary patches.
+# All thanks to Mike Bombich
+# http://www.bombich.com/mactips/rsync.html
+
+USAGE="$(basename $0) rsync_version"
+BACK=$PWD
+
+if [[ -z $1 ]]; then
+ echo $USAGE 2>&1
+ exit 1
+fi
+
+RSYNC_VERSION=$1
+mkdir /tmp/build_rsync > /dev/null 2>&1
+cd /tmp/build_rsync
+
+echo "Downloading rsync..."
+curl --progress -O http://rsync.samba.org/ftp/rsync/rsync-${RSYNC_VERSION}.tar.gz > /dev/null 2>&1
+curl --progress -O http://rsync.samba.org/ftp/rsync/rsync-patches-${RSYNC_VERSION}.tar.gz > /dev/null 2>&1
+
+echo "Extracting rsync..."
+tar -zxvf rsync-${RSYNC_VERSION}.tar.gz
+tar -zxvf rsync-patches-${RSYNC_VERSION}.tar.gz
+cd rsync-${RSYNC_VERSION}
+
+echo "Building rsync..."
+patch -p1 <patches/fileflags.diff
+patch -p1 <patches/crtimes.diff
+./prepare-source
+./configure
+make
+cp ./rsync "${BACK}"
+
+rm -r /tmp/build_rsync