downloading files using aria2 or curl or wget
This commit is contained in:
parent
cc69d041d2
commit
324794c7a5
|
@ -193,14 +193,20 @@ function download_component() {
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
show_message "downloading $4 ..."
|
show_message "downloading $4 ..."
|
||||||
pkgres=$(package_installed aria2c "summary")
|
ariapkg=$(package_installed aria2c "summary")
|
||||||
if [ "$pkgres" == "true" ];then
|
curlpkg=$(package_installed curl "summary")
|
||||||
|
|
||||||
|
if [ "$ariapkg" == "true" ];then
|
||||||
show_message "using aria2c to download $4"
|
show_message "using aria2c to download $4"
|
||||||
aria2c -c -x 8 -d "$CACHE_PATH" -o $4 $3
|
aria2c -c -x 8 -d "$CACHE_PATH" -o $4 $3
|
||||||
|
|
||||||
if [ $? -eq 0 ];then
|
if [ $? -eq 0 ];then
|
||||||
notify-send "$4 download completed" -i "download"
|
notify-send "$4 download completed" -i "download"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
elif [ "$curlpkg" == "true" ];then
|
||||||
|
show_message "using curl to download $4"
|
||||||
|
curl $3 -o $1
|
||||||
else
|
else
|
||||||
show_message "using wget to download $4"
|
show_message "using wget to download $4"
|
||||||
wget "$3" -P "$CACHE_PATH"
|
wget "$3" -P "$CACHE_PATH"
|
||||||
|
|
4
setup.sh
4
setup.sh
|
@ -12,7 +12,7 @@ function main() {
|
||||||
case "$answer" in
|
case "$answer" in
|
||||||
|
|
||||||
1)
|
1)
|
||||||
echo "run illustrator CC Installation..."
|
echo -n "run illustrator CC Installation..."
|
||||||
run_script "scripts/illustratorSetup.sh" "illustratorSetup.sh"
|
run_script "scripts/illustratorSetup.sh" "illustratorSetup.sh"
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
|
@ -20,7 +20,7 @@ function main() {
|
||||||
run_script "scripts/resetIllustrator.sh" "resetIllustrator.sh"
|
run_script "scripts/resetIllustrator.sh" "resetIllustrator.sh"
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
echo "run winecfg..."
|
echo "runing winecfg"
|
||||||
echo -n "open virtualdrive configuration..."
|
echo -n "open virtualdrive configuration..."
|
||||||
run_script "scripts/winecfg.sh" "winecfg.sh"
|
run_script "scripts/winecfg.sh" "winecfg.sh"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue