#!/bin/sh # script/setup: Set up application for the first time after cloning, or set it # back to the initial first unused state. set -e cd "$[dirname $0]/.." script/bootstrap echo "==> Setting up DB…" # reset database to a fresh state. bin/rake db:create db:reset if test -z $RAILS_ENV && test -z $RACK_ENV { # Only things for a development environment will run inside here # Do things that need to be done to the application to set up for the first # time. Or things needed to be run to to reset the application back to first # use experience. These things are scoped to the application's domain. true } echo "==> App is now ready to go!" (CommandList children: [ (C {(set)} {(-e)}) (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(dirname)} {(DQ ($ VSub_Number "$0"))})]) left_token: spids: [19 25] ) (/..) ) } ) (C {(script/bootstrap)}) (C {(echo)} {(DQ ("==> Setting up DB\u2026"))}) (C {(bin/rake)} {(db) (Lit_Other ":") (create)} {(db) (Lit_Other ":") (reset)}) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$RAILS_ENV"))} {(Lit_Other "]")}) (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$RACK_ENV"))} {(Lit_Other "]")}) ] op_id: Op_DAmp ) terminator: ) ] action: [(C {(true)})] spids: [-1 78] ) ] spids: [-1 99] ) (C {(echo)} {(DQ ("==> App is now ready to go!"))}) ] )