echo"Capturing output to install-$(date +%Y%m%d-%H%M%S).log."
log_file=logs/install-$(date +%Y%m%d-%H%M%S).log
exec>>(tee $log_file) 2>&1
echo"Capturing output to $log_file"
echo"Installation started at $(date '+%Y-%m-%d %H:%M:%S')"
echo"Installation started at $(date '+%Y-%m-%d %H:%M:%S')"
export OPENEDX_RELEASE=$release
export OPENEDX_RELEASE=$release
...
@@ -138,32 +145,28 @@ if [[ $vagrant_mount_location != "" ]]; then
...
@@ -138,32 +145,28 @@ if [[ $vagrant_mount_location != "" ]]; then
export VAGRANT_MOUNT_BASE=vagrant_mount_location
export VAGRANT_MOUNT_BASE=vagrant_mount_location
fi
fi
if[[-d"$stack"]];then
if[[-d.vagrant]];then
echo-e"${ERROR}A $stack directory already exists here. If you already tried installing $stack, make sure to vagrant destroy the $stack machine and rm -rf the $stack directory before trying to reinstall. If you would like to install a separate $stack, change to a different directory and try running the script again.${NC}"
echo-e"${ERROR}A .vagrant directory already exists here. If you already tried installing $stack, make sure to vagrant destroy the $stack machine and 'rm -rf .vagrant' before trying to reinstall. If you would like to install a separate $stack, change to a different directory and try running the script again.${NC}"
exit 1
exit 1
fi
fi
if[[$stack=="devstack"]];then# Install devstack
if[[$stack=="devstack"]];then# Install devstack
# Warn if release chosen is not master or open-release (Eucalyptus and up)
# Warn if release chosen is not master or open-release (Eucalyptus and up)
echo-e"${WARN}The release you entered is not 'master' or an open-release. Please be aware that a branch other than master or a release other than the latest open-release could cause errors when installing $stack.${NC}"
echo-e"${WARN}The release you entered is not 'master' or an open-release. Please be aware that a branch other than master or a release other than the latest open-release could cause errors when installing $stack.${NC}" | fmt
# Warn if release chosen is not open-release (Eucalyptus and up)
# Warn if release chosen is not open-release (Eucalyptus and up)
if[[$release!=*"open-release"*]];then
if[[$release!="open-release"*]];then
echo-e"${WARN}The release you entered is not an open-release. Please be aware that a branch other than the latest open-release could cause errors when installing $stack.${NC}"
echo-e"${WARN}The release you entered is not an open-release. Please be aware that a branch other than the latest open-release could cause errors when installing $stack.${NC}"