Commit f0600e5e authored by Tim Powell's avatar Tim Powell

Added local flag for CI use

parent e90aed9c
Pipeline #1090 canceled with stages
in 1 minute and 5 seconds
......@@ -10,15 +10,6 @@ YELLOW='\033[1;33m'
ITALIC='\033[3m'
NC='\033[0m' # No Color or Syntax
# CHeck if in repo and move to top level of repo
if [[ -d $(git rev-parse --git-dir 2> /dev/null) ]]; then
cd "$(git rev-parse --show-toplevel)"
repo_location=$(pwd)
else
echo "ERROR: Not a git directory. Please run setup.sh from the HEV repository."
exit 1
fi
# Create a hosts file from default
hostsfile="ansible/playbooks/hosts"
......@@ -53,11 +44,21 @@ function create_hostsfile {
# Check if local flag has been used
cli_flag1=$1
if [[ $cli_flag1 == 'local' ]]; then
if [[ $cli_flag1 == 'CI' ]]; then
cp -rp ansible/playbooks/hosts.local $hostsfile
local=True
repo_location=$(pwd)
echo "Installing locally at $repo_location."
elif [[ $cli_flag1 == '' ]]; then
# Check if in repo and move to top level of repo
if [[ -d $(git rev-parse --git-dir 2> /dev/null) ]]; then
cd "$(git rev-parse --show-toplevel)"
repo_location=$(pwd)
else
echo "ERROR: Not a git directory. Please run setup.sh from the HEV repository."
exit 1
fi
# Get the pi / vm ip address from user
if [[ -f $hostsfile ]]; then
# Check if hosts file already exists
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment