aboutsummaryrefslogtreecommitdiffstats
path: root/build_rsync.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build_rsync.sh')
-rwxr-xr-xbuild_rsync.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/build_rsync.sh b/build_rsync.sh
index 5f28dab..249f282 100755
--- a/build_rsync.sh
+++ b/build_rsync.sh
@@ -16,11 +16,22 @@ fi
RSYNC_VERSION=$1
mkdir /tmp/build_rsync > /dev/null 2>&1
+
cd /tmp/build_rsync
+MIRROR="http://rsync.samba.org/ftp/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
+curl --progress -O ${MIRROR}/rsync-${RSYNC_VERSION}.tar.gz > /dev/null 2>&1
+if [[ $? -ne 0 ]]; then
+ echo "Failed to download rsync" 2>&1
+ exit 1
+fi
+curl --progress -O ${MIRROR}/rsync-patches-${RSYNC_VERSION}.tar.gz > /dev/null 2>&1
+if [[ $? -ne 0 ]]; then
+ echo "Failed to download rsync-patches" 2>&1
+ exit 1
+fi
echo "Extracting rsync..."
tar -zxvf rsync-${RSYNC_VERSION}.tar.gz