Use aria2 to download Content when available

This commit is contained in:
nsubiron 2019-03-19 14:36:14 +01:00
parent 8451a84c2a
commit 07b1bfa0ee
2 changed files with 8 additions and 1 deletions

1
.gitignore vendored
View File

@ -28,6 +28,7 @@ Install
*.workspace
*CodeCompletionFolders.txt
*CodeLitePreProcessor.txt
.aria2c.input
.codelite
.gdb_history
.gtest

View File

@ -58,7 +58,13 @@ function download_content {
fi
mkdir -p $CONTENT_FOLDER
mkdir -p Content
wget ${CONTENT_LINK} Content.tar.gz
if hash aria2c 2>/dev/null; then
echo -e "${CONTENT_LINK}\n\tout=Content.tar.gz" > .aria2c.input
aria2c -j12 -x12 --input-file=.aria2c.input
rm -f .aria2c.input
else
wget ${CONTENT_LINK} Content.tar.gz
fi
tar -xvzf Content.tar.gz -C Content
rm Content.tar.gz
mv Content/* $CONTENT_FOLDER