Created
June 6, 2015 18:18
-
-
Save sbellware/74a8090fc73c871c016b to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
projections=( | |
"by_category" | |
"by_event_type" | |
"stream_by_category" | |
"streams" | |
"users" | |
) | |
echo | |
echo "Enabling Projections" | |
echo "= = =" | |
echo | |
for name in "${projections[@]}"; do | |
echo | |
echo "Enabling $name" | |
echo "- - -" | |
if [[ ! "$name" == "users" ]]; then | |
name="%24$name" | |
curl -i -X POST -d '' http://127.0.0.1:2113/projection/${name}/command/enable -u admin:changeit | |
else | |
echo "$name is enabled by default. Skipping." | |
fi | |
echo | |
echo | |
done | |
echo "= = =" | |
echo "done" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment