blob: a5632cdd38678b286be2c825a846657b24d16f3b [file] [log] [blame]
Sergio Slobodrianc5477712017-06-07 11:56:56 -04001#!/bin/bash
2
3baseImage="Ubuntu1604LTS"
4iVmName="vInstaller"
5iVmNetwork="default"
6shutdownTimeout=5
7ipTimeout=10
8installerArchive="installer.tar.bz2"
9installerPart="installer.part"
10
11lBlue='\033[1;34m'
12green='\033[0;32m'
13orange='\033[0;33m'
14NC='\033[0m'
15red='\033[0;31m'
16yellow='\033[1;33m'
17dGrey='\033[1;30m'
18lGrey='\033[1;37m'
19lCyan='\033[1;36m'
20
21wd=`pwd`
22
23# Check if the tar file is available.
24echo -e "${lBlue}Checking for the installer archive ${lCyan}$installerArchive${NC}"
25
26if [ ! -f $installerArchive ]; then
27 # The installer file ins't there, check for parts to re-assemble
28 echo -e "${lBlue}Checking for the installer archive parts ${lCyan}$installerPart*${NC}"
29 fList=`ls ${installerPart}*`
30 if [ -z "$fList" ]; then
31 echo -e "${red} Could not find installer archive or installer archive parts, ABORTING.${NC}"
32 exit
33 else
34 # All is well, concatenate the files together to create the installer archive
35 echo -e "${lBlue}Creating the installer archive ${lCyan}$installerArchive${NC}"
36 cat $fList > installer.tar.bz2
37 rm -fr $fList
38 fi
39fi
40
41# Extract the installer files and bootstrap the installer
42echo -e "${lBlue}Extracting the content of the installer archive ${lCyan}$installerArchive${NC}"
43tar xjf $installerArchive
44echo -e "${lBlue}Starting the installer{NC}"
45chmod u+x BootstrapInstaller.sh
Sergio Slobodrian7c483622017-06-13 15:51:34 -040046./BootstrapInstaller.sh "$@"