Created
March 21, 2014 19:54
-
-
Save BrianHicks/9694933 to your computer and use it in GitHub Desktop.
semi-useful scripts for working with Fleet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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