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
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							21 lines
						
					
					
						
							460 B
						
					
					
				
								#!/usr/bin/env bash
							 | 
						|
								
							 | 
						|
								export RAILS_ENV=production
							 | 
						|
								export SECRET_KEY_BASE=42
							 | 
						|
								export SEMANTIC_LOGGER_APP=egr
							 | 
						|
								
							 | 
						|
								function usage {
							 | 
						|
								  echo "argument required:"
							 | 
						|
								  echo "  server"
							 | 
						|
								  echo "  console"
							 | 
						|
								  echo "  <...> (any rake entry)"
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								command=$1
							 | 
						|
								[[ -z "$command" ]] && usage && exit
							 | 
						|
								if [[ $command =~ 'server|s' ]]; then
							 | 
						|
								  [[ -d public/assets ]] && echo "ASSETS are already precompiled: MODIFIED_TIME" || rails assets:precompile
							 | 
						|
								  rails server
							 | 
						|
								else
							 | 
						|
								  rails $command
							 | 
						|
								fi
							 |