Skip to content

Instantly share code, notes, and snippets.

@stas
Created September 27, 2009 14:31
Show Gist options
  • Save stas/194798 to your computer and use it in GitHub Desktop.
Save stas/194798 to your computer and use it in GitHub Desktop.
create_aliases.sh
#/bin/bash
FILE='/tmp/redmin_projects'
MAILHANDLR='/var/www/redmine/extra/mail_handler/rdm-mailhandler.rb'
URL='http://host.tld'
KEY='yourkey'
OPTS='priority,status'
wget -q $URL/projects.yaml -O - | grep 'identifier: ' | cut -d ':' -f2 > $FILE
exec<$FILE
while read p
do
echo "$p: \"|$MAILHANDLR --url $URL --key $KEY --project $p -o $OPTS\""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment