machi/rel/gen_dev
Scott Lystig Fritchie 11921d82bf WIP: start of demo doc
2016-02-23 17:30:30 +09:00

16 lines
283 B
Bash
Executable file

#! /bin/sh
#
# Example usage: gen_dev dev4 vars.src vars
#
# Generate an overlay config for devNNN from vars.src and write to vars
#
NAME=$1
TEMPLATE=$2
VARFILE=$3
NODE="$NAME@127.0.0.1"
echo "Generating $NAME - node='$NODE'"
sed -e "s/@NODE@/$NODE/" \
< $TEMPLATE > $VARFILE