Skip to content

Instantly share code, notes, and snippets.

@atiaxi
Created August 28, 2013 19:09
Show Gist options
  • Save atiaxi/6369971 to your computer and use it in GitHub Desktop.
Save atiaxi/6369971 to your computer and use it in GitHub Desktop.
#!/bin/bash
. /opt/reddit/etc/reddit-env.sh
# poor man's interpolation!
INI_FILE=$(mktemp)
trap "rm $INI_FILE" EXIT
cat > $INI_FILE <<EOF
[DEFAULT]
http_port = $STAGING_HTTP_PORT
memcached_port = $STAGING_MEMCACHED_PORT
user = $STAGING_USER
EOF
grep -v '\[DEFAULT\]' $STAGING_PRIVATE_ROOT/dump.ini >> $INI_FILE
paster --plugin r2 run $INI_FILE "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment