You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
460 B

2 months ago
2 months ago
2 months ago
  1. #!/usr/bin/env bash
  2. export RAILS_ENV=production
  3. export SECRET_KEY_BASE=42
  4. export SEMANTIC_LOGGER_APP=egr
  5. function usage {
  6. echo "argument required:"
  7. echo " server"
  8. echo " console"
  9. echo " <...> (any rake entry)"
  10. }
  11. command=$1
  12. [[ -z "$command" ]] && usage && exit
  13. if [[ $command =~ 'server|s' ]]; then
  14. [[ -d public/assets ]] && echo "ASSETS are already precompiled: MODIFIED_TIME" || rails assets:precompile
  15. rails server
  16. else
  17. rails $command
  18. fi