Changed rmq script to ruby from bash

This commit is contained in:
Todd Werth
2013-08-26 12:57:30 -07:00
parent d2b05d9082
commit 4c5616f5c5

21
bin/rmq
View File

@@ -1,6 +1,17 @@
#!/bin/bash
#!/usr/bin/env ruby
if [[ $1 == 'create' ]]; then
echo "RMQ - Creating project: $2"
motion create "--template=git@github.com:infinitered/rmq-template.git" $2
fi
unless ARGV.length == 2
puts 'RMQ - Invalid command, do something like this: rmq create my_new_app'
exit
end
action = ARGV[0]
value = ARGV[1]
case action
when 'create'
`motion create --template=git@github.com:infinitered/rmq-template.git #{value}`
else
puts 'RMQ - Invalid action'
end