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.
		
		
		
		
		
			
		
			
				
					
					
						
							23 lines
						
					
					
						
							671 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							23 lines
						
					
					
						
							671 B
						
					
					
				
								#!/usr/bin/env bash
							 | 
						|
								
							 | 
						|
								if ! gem list foreman -i --silent; then
							 | 
						|
								  echo "Installing foreman..."
							 | 
						|
								  gem install foreman
							 | 
						|
								fi
							 | 
						|
								
							 | 
						|
								# ----------------------------------------------------------------------
							 | 
						|
								# in case of running with RAILS_ENV=production with assets precompiling!
							 | 
						|
								# ----------------------------------------------------------------------
							 | 
						|
								
							 | 
						|
								if [[ -d public/assets ]]; then
							 | 
						|
								  echo
							 | 
						|
								  echo "You have probably precompiled assets for production purpose!"
							 | 
						|
								  echo
							 | 
						|
								  echo "Would you like to remove these assets before running in DEV?"
							 | 
						|
								  echo "-- Press Enter to confirm / Ctrl+C to cancel"
							 | 
						|
								  read
							 | 
						|
								  rm -rf public/assets
							 | 
						|
								  rm -rf tmp/cache
							 | 
						|
								fi
							 | 
						|
								
							 | 
						|
								exec foreman start -f Procfile.dev "$@"
							 |