#!/bin/bash -e # # Copyright 2013 LinkedIn, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # This script generates a final-cluster.xml for spinning up a new cluster. # Argument = -c current_cluster -s current_stores -o output dir # The final cluster is placed in output_dir/ # This script uses getopts which means only single character switches are allowed. # Using getopt would allow for multi charcter switch names but would come at a # cost of not being cross compatible. # Function to display usage usage_and_exit() { echo "ERROR: $1." cat <