Skip to content

Instantly share code, notes, and snippets.

@BrianHicks
Created March 21, 2014 19:54
Show Gist options
  • Save BrianHicks/9694933 to your computer and use it in GitHub Desktop.
Save BrianHicks/9694933 to your computer and use it in GitHub Desktop.
semi-useful scripts for working with Fleet
#!/bin/bash
conf=$1
count=$2
if [ -z "${conf}" ] || [ -z "${count}" ]; then
echo "Usage: $0 conf count" 1>&2
exit 1
fi
dir=$(echo $conf | sed "s/service/instances/")
mkdir $dir
for (( i=1; i<=$count; i++ )); do
sed "s/__ID__/$i/g" $conf > $dir/$(echo $conf | sed "s/service$/$i.service/")
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment