|
|
@ -14,6 +14,7 @@ function list_all() { |
|
|
|
FUNC="${OS}" |
|
|
|
FUNC="${OS}" |
|
|
|
fi |
|
|
|
fi |
|
|
|
case ${OS} in |
|
|
|
case ${OS} in |
|
|
|
|
|
|
|
elementary) DISPLAY_NAME="elementary OS";; |
|
|
|
freebsd) DISPLAY_NAME="FreeBSD";; |
|
|
|
freebsd) DISPLAY_NAME="FreeBSD";; |
|
|
|
linuxmint) DISPLAY_NAME="Linux Mint";; |
|
|
|
linuxmint) DISPLAY_NAME="Linux Mint";; |
|
|
|
macos) DISPLAY_NAME="macOS";; |
|
|
|
macos) DISPLAY_NAME="macOS";; |
|
|
@ -39,8 +40,9 @@ function list_all() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function os_support() { |
|
|
|
function os_support() { |
|
|
|
echo fedora \ |
|
|
|
echo elementary \ |
|
|
|
freebsd \ |
|
|
|
freebsd \ |
|
|
|
|
|
|
|
fedora \ |
|
|
|
kubuntu \ |
|
|
|
kubuntu \ |
|
|
|
linuxmint \ |
|
|
|
linuxmint \ |
|
|
|
lubuntu \ |
|
|
|
lubuntu \ |
|
|
@ -56,6 +58,10 @@ function os_support() { |
|
|
|
xubuntu |
|
|
|
xubuntu |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function releases_elementary() { |
|
|
|
|
|
|
|
echo 6_0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function releases_freebsd(){ |
|
|
|
function releases_freebsd(){ |
|
|
|
echo 12_2 \ |
|
|
|
echo 12_2 \ |
|
|
|
13_0 |
|
|
|
13_0 |
|
|
@ -395,7 +401,10 @@ function make_vm_config() { |
|
|
|
local GUEST="" |
|
|
|
local GUEST="" |
|
|
|
IMAGE_FILE="${1}" |
|
|
|
IMAGE_FILE="${1}" |
|
|
|
ISO_FILE="${2}" |
|
|
|
ISO_FILE="${2}" |
|
|
|
if [[ "${OS}" == "freebsd" ]]; then |
|
|
|
if [[ "${OS}" == "elementary" ]]; then |
|
|
|
|
|
|
|
GUEST="linux" |
|
|
|
|
|
|
|
IMAGE_TYPE="iso" |
|
|
|
|
|
|
|
elif [[ "${OS}" == "freebsd" ]]; then |
|
|
|
GUEST="freebsd" |
|
|
|
GUEST="freebsd" |
|
|
|
IMAGE_TYPE="iso" |
|
|
|
IMAGE_TYPE="iso" |
|
|
|
elif [[ "${OS}" == "fedora" ]]; then |
|
|
|
elif [[ "${OS}" == "fedora" ]]; then |
|
|
@ -450,6 +459,24 @@ function start_vm_info() { |
|
|
|
echo |
|
|
|
echo |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function get_elementary() { |
|
|
|
|
|
|
|
case ${RELEASE} in |
|
|
|
|
|
|
|
6_0) VERSION=${RELEASE//_/.};; |
|
|
|
|
|
|
|
*) |
|
|
|
|
|
|
|
echo "ERROR! elementary OS ${RELEASE} is not a supported release." |
|
|
|
|
|
|
|
releases_elementary |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ISO=elementaryos-6.0-stable.20211005.iso |
|
|
|
|
|
|
|
URL="https://ams3.dl.elementary.io/download/MTYzNDU5MDA5NA==/${ISO}" |
|
|
|
|
|
|
|
make_vm_dir |
|
|
|
|
|
|
|
web_get ${URL} ${VM_PATH} |
|
|
|
|
|
|
|
make_vm_config ${ISO} |
|
|
|
|
|
|
|
start_vm_info |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function get_freebsd() { |
|
|
|
function get_freebsd() { |
|
|
|
# For future releases, use dvd1 iso files. |
|
|
|
# For future releases, use dvd1 iso files. |
|
|
|
local URL="" |
|
|
|
local URL="" |
|
|
@ -835,7 +862,9 @@ if [ -n "${2}" ]; then |
|
|
|
RELEASE="${2,,}" |
|
|
|
RELEASE="${2,,}" |
|
|
|
else |
|
|
|
else |
|
|
|
echo "ERROR! You must specify an OS release name." |
|
|
|
echo "ERROR! You must specify an OS release name." |
|
|
|
if [ "${OS}" == "freebsd" ]; then |
|
|
|
if [ "${OS}" == "elementary" ]; then |
|
|
|
|
|
|
|
releases_elementary |
|
|
|
|
|
|
|
elif [ "${OS}" == "freebsd" ]; then |
|
|
|
releases_freebsd |
|
|
|
releases_freebsd |
|
|
|
elif [ "${OS}" == "fedora" ]; then |
|
|
|
elif [ "${OS}" == "fedora" ]; then |
|
|
|
releases_fedora |
|
|
|
releases_fedora |
|
|
@ -857,7 +886,9 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
VM_PATH="${OS}-${RELEASE}" |
|
|
|
VM_PATH="${OS}-${RELEASE}" |
|
|
|
|
|
|
|
|
|
|
|
if [ "${OS}" == "macos" ]; then |
|
|
|
if [ "${OS}" == "elementary" ]; then |
|
|
|
|
|
|
|
get_elementary |
|
|
|
|
|
|
|
elif [ "${OS}" == "macos" ]; then |
|
|
|
get_macos |
|
|
|
get_macos |
|
|
|
elif [[ "${OS}" == "freebsd" ]]; then |
|
|
|
elif [[ "${OS}" == "freebsd" ]]; then |
|
|
|
get_freebsd |
|
|
|
get_freebsd |
|
|
|