Skip to content
Snippets Groups Projects
Commit ee45dce8 authored by Recolic's avatar Recolic :house_with_garden:
Browse files

.note

parent d441c0b4
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ Turn your server/desktop to DigitalOcean / Linode / Vultr with a super-simple sc
qemu, bash, sed
Optional: aria2c (simply replace aria2c with curl if you don't like it)
Any of them: aria2c / wget / curl
> ArchLinux user: simply run `pacman -S cdrkit qemu-base aria2`
......
......@@ -47,7 +47,13 @@ function download_cloud_img_if_not_exist () {
[ ! "${knowledge[$cloudimg]+abc}" ] && echo2 "Unknown cloudimg $cloudimg. cannot download it." && return 1
echo2 "+ Downloading cloudimg $cloudimg..."
aria2c -o "base/$cloudimg" "${knowledge[$cloudimg]}" || ! echo2 "Failed to download ubuntu cloudimg" || return $?
if which aria2c; then
aria2c -o "base/$cloudimg" "${knowledge[$cloudimg]}" || ! echo2 "Failed to download ubuntu cloudimg" || return $?
elif which wget; then
wget -O "base/$cloudimg" "${knowledge[$cloudimg]}" || ! echo2 "Failed to download ubuntu cloudimg" || return $?
elif which curl; then
curl -o "base/$cloudimg" "${knowledge[$cloudimg]}" || ! echo2 "Failed to download ubuntu cloudimg" || return $?
fi
}
function create_vm_if_not_exist () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment