Skip to content

Instantly share code, notes, and snippets.

@sbellware
Created June 6, 2015 18:18
Show Gist options
  • Save sbellware/74a8090fc73c871c016b to your computer and use it in GitHub Desktop.
Save sbellware/74a8090fc73c871c016b to your computer and use it in GitHub Desktop.
#!/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