Fixes OVF converter and upload
Adds the ability to specify hardware version
Defaults hardware version to 14 for compatibility
Displays list of OS types in help
Adds a working vCD upload
Adds simple usage file
Cleans up installation path
Bug 850
Change-Id: I1f4658e48869149c523a80401487e3e6c25dc809
Signed-off-by: beierl <mbeierl@vmware.com>
diff --git a/tools/OVF_converter/install.sh b/tools/OVF_converter/install.sh
index 7b184c8..d25c1f6 100755
--- a/tools/OVF_converter/install.sh
+++ b/tools/OVF_converter/install.sh
@@ -22,22 +22,23 @@
##
echo '
- #################################################################
- ##### Installing Require Packages #####
- #################################################################'
+ ################################################################
+ ##### Installing Required Packages #####
+ ################################################################'
# Paths to copy application files
Install_dir="/usr/local/bin"
App_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-App_CLI_path="${App_dir}/format_converter/ovf_converter_cli.py"
-Install_CLI_path="${Install_dir}/OVF_converter/format_converter/ovf_converter_cli.py"
+Converter_App_CLI_path="${App_dir}/ovf_converter_cli.py"
+Converter_Install_CLI_path="${Install_dir}/OVF_converter/ovf_converter_cli.py"
+Uploader_App_CLI_path="${App_dir}/ovf_uploader_cli.py"
+Uploader_Install_CLI_path="${Install_dir}/OVF_converter/ovf_uploader_cli.py"
Logs_Folder="${Install_dir}/OVF_converter/logs"
-Log_Path="${Install_dir}/OVF_converter/logs/ovf_converter.log"
#Function to install packages using apt-get
function install_packages(){
[ -x /usr/bin/apt-get ] && apt-get install -y $*
-
+
#check properly installed
for PACKAGE in $*
do
@@ -50,7 +51,7 @@
fi
done
}
-
+
apt-get update # To get the latest package lists
install_packages "libxml2-dev libxslt-dev python-dev python-pip python-lxml python-yaml"
install_packages "qemu-utils"
@@ -62,18 +63,21 @@
#Create logs folder and file
mkdir "${Logs_Folder}"
-touch "${Log_Path}"
#Change permission
-chmod -R 777 $Install_CLI_path
-chmod -R 777 $Log_Path
+chmod -R 777 ${Converter_Install_CLI_path}
+chmod -R 777 ${Uploader_Install_CLI_path}
+chmod -R 777 ${Logs_Folder}
touch "${Install_dir}/ovf_converter"
echo "#!/bin/sh" > "${Install_dir}/ovf_converter"
-echo "python ${Install_CLI_path} \"\$@\"" >> "${Install_dir}/ovf_converter"
+echo "python3 ${Converter_Install_CLI_path} \"\$@\"" >> "${Install_dir}/ovf_converter"
chmod a+x "${Install_dir}/ovf_converter"
-echo '
- #################################################################
- ##### Done #####
- #################################################################'
+touch "${Install_dir}/ovf_uploader"
+echo "#!/bin/sh" > "${Install_dir}/ovf_uploader"
+echo "python3 ${Uploader_Install_CLI_path} \"\$@\"" >> "${Install_dir}/ovf_uploader"
+chmod a+x "${Install_dir}/ovf_uploader"
+
+echo "Installation complete. More information can be found at:"
+echo " ${Install_dir}/OVF_converter/Usage.txt"