Use aria2 to download Content when available
This commit is contained in:
parent
8451a84c2a
commit
07b1bfa0ee
|
@ -28,6 +28,7 @@ Install
|
|||
*.workspace
|
||||
*CodeCompletionFolders.txt
|
||||
*CodeLitePreProcessor.txt
|
||||
.aria2c.input
|
||||
.codelite
|
||||
.gdb_history
|
||||
.gtest
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue