Skip to content

Commit

Permalink
Fix case statement in lib/sandbox.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed May 4, 2015
1 parent b4480b9 commit 15d98b0
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions lib/sandbox.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
#!/bin/sh
# Used in the sandbox rake task in Rakefile

RAILSDB=$(case "$DB" in
postgres) echo "postgresql";;
mysql) echo "mysql";;
*) echo "sqlite3";;
esac)
case "$DB" in
postgres)
RAILSDB="postgresql"
;;
mysql)
RAILSDB="mysql"
;;
*)
RAILSDB="sqlite3"
;;
esac

echo $RAILSDB

rm -rf ./sandbox
bundle exec rails new sandbox --skip-bundle --database="$RAILSDB"
Expand Down

0 comments on commit 15d98b0

Please sign in to comment.