#!/bin/bash -eu


pushd "cf-networking"
  if [ ! -f "manifest-generation/opsfiles/cf-networking.yml" ] ; then
    exit 1
  fi

  # grep returns non-zero exit status when no lines match
  set +e
  let non_comment_lines=$(grep -Ecv '^#' manifest-generation/opsfiles/cf-networking.yml)
  set -e
  if [ "$non_comment_lines" -ne "0" ]; then
    echo "additions in cf-networking.yml should be merged in cf-deployment before shipping"
    exit 1
  fi
popd
