more echo cleanup

This commit is contained in:
Jack
2020-05-13 06:34:04 +03:00
parent df20843337
commit c1a11d409a
+13 -20
View File
@@ -97,10 +97,8 @@ echo "# VM RAM in MB, minimum 2048"
pad_to_33_chars "gpu_vram=${gpu_vram}" pad_to_33_chars "gpu_vram=${gpu_vram}"
echo "# VM video RAM in MB, minimum 34, maximum 128" echo "# VM video RAM in MB, minimum 34, maximum 128"
pad_to_33_chars "resolution=\"${resolution}\"" pad_to_33_chars "resolution=\"${resolution}\""
echo -ne "# VM display resolution echo "# VM display resolution"
echo -ne "\nThese values may be customized as described in the documentation.\n
These values may be customized as described in the documentation.
${highlight_color}Press enter to continue, CTRL-C to exit.${default_color}" ${highlight_color}Press enter to continue, CTRL-C to exit.${default_color}"
clear_input_buffer_then_read clear_input_buffer_then_read
} }
@@ -280,12 +278,10 @@ elif [[ ! ( "${vbox_version:0:1}" -gt 5
echo "Exiting." echo "Exiting."
exit exit
elif [[ "${vbox_version:0:1}" = 5 ]]; then elif [[ "${vbox_version:0:1}" = 5 ]]; then
echo -ne "\n${highlight_color}VirtualBox version ${vbox_version} detected.${default_color} Please see the following echo -e "\n${highlight_color}VirtualBox version ${vbox_version} detected.${default_color} Please see the following"
URL for issues with the VISO filesystem on VirtualBox 5.2 to 5.2.40: echo -ne "URL for issues with the VISO filesystem on VirtualBox 5.2 to 5.2.40:\n\n"
echo " https://github.com/myspaghetti/macos-guest-virtualbox/issues/86"
https://github.com/myspaghetti/macos-guest-virtualbox/issues/86 echo -ne "\n${highlight_color}Press enter to continue, CTRL-C to exit.${default_color}"
${highlight_color}Press enter to continue, CTRL-C to exit.${default_color}"
clear_input_buffer_then_read clear_input_buffer_then_read
fi fi
@@ -370,11 +366,9 @@ fi
function create_vm() { function create_vm() {
print_dimly "stage: create_vm" print_dimly "stage: create_vm"
if [[ -n "$( VBoxManage createvm --name "${vm_name}" --ostype "MacOS1013_64" --register 2>&1 >/dev/null )" ]]; then if [[ -n "$( VBoxManage createvm --name "${vm_name}" --ostype "MacOS1013_64" --register 2>&1 >/dev/null )" ]]; then
echo -e "\nError: Could not create virtual machine \"${vm_name}\". echo -e "\nError: Could not create virtual machine \"${vm_name}\"."
${highlight_color}Please delete exising \"${vm_name}\" VirtualBox configuration files ${warning_color}manually${default_color}. echo -e "${highlight_color}Please delete exising \"${vm_name}\" VirtualBox configuration files ${warning_color}manually${default_color}.\n"
echo -e "Error message:\n"
Error message:
"
VBoxManage createvm --name "${vm_name}" --ostype "MacOS1013_64" --register 2>/dev/tty VBoxManage createvm --name "${vm_name}" --ostype "MacOS1013_64" --register 2>/dev/tty
exit exit
fi fi
@@ -415,12 +409,11 @@ wget "${sucatalog}" \
# if file was not downloaded correctly # if file was not downloaded correctly
if [[ ! -s "${macOS_release_name}_sucatalog" ]]; then if [[ ! -s "${macOS_release_name}_sucatalog" ]]; then
wget --debug -O /dev/null -o "${macOS_release_name}_wget.log" "${sucatalog}" wget --debug -O /dev/null -o "${macOS_release_name}_wget.log" "${sucatalog}"
echo $'\n'"Couldn't download the Apple software update catalog." echo -e "\nCouldn't download the Apple software update catalog."
if [[ "$(expr match "$(cat "${macOS_release_name}_wget.log")" '.*ERROR[[:print:]]*is not trusted')" -gt "0" ]]; then if [[ "$(expr match "$(cat "${macOS_release_name}_wget.log")" '.*ERROR[[:print:]]*is not trusted')" -gt "0" ]]; then
echo -e " echo -e "\nMake sure certificates from a certificate authority are installed."
Make sure certificates from a certificate authority are installed. echo "Certificates are often installed through the package manager with"
Certificates are often installed through the package manager with echo "a package named ${highlight_color}ca-certificates${default_color}"
a package named ${highlight_color}ca-certificates${default_color}"
fi fi
echo "Exiting." echo "Exiting."
exit exit