Skip to content

Commit 28e5e03

Browse files
committed
Added download progress information (where available) to docker/setupdb.
- Legacy-Id: 18252
1 parent 9cdd9ad commit 28e5e03

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

docker/setupdb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,10 @@ done
105105

106106
cd $(dirname $MYSQLDIR)
107107
echo "Downloading a MySQL database image ..."
108-
rsync -v $URL ./ && echo -e "\nUnpacking database ..." && tar xjf ietf_utf8.bin.tar.bz2 && echo "Fixing permissions ..." && chmod -R go+rwX mysql
109-
108+
set $(rsync --version | head -n1 | awk '{print $3}' | tr '.' ' ')
109+
maj=$1; min=$2; fix=$3
110+
if [ "$maj" -ge "3" -a "$min" -ge "1" ]; then
111+
rsync --info=progress2 $URL ./ && echo -e "\nUnpacking database ..." && tar xjf ietf_utf8.bin.tar.bz2 && echo "Fixing permissions ..." && chmod -R go+rwX mysql
112+
else
113+
rsync -v $URL ./ && echo -e "\nUnpacking database ..." && tar xjf ietf_utf8.bin.tar.bz2 && echo "Fixing permissions ..." && chmod -R go+rwX mysql
114+
fi

0 commit comments

Comments
 (0)