Adds riesel
This commit is contained in:
		
							parent
							
								
									30f652007c
								
							
						
					
					
						commit
						b03a69e59e
					
				
							
								
								
									
										17
									
								
								bin/riesel
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										17
									
								
								bin/riesel
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,17 @@ | |||||||
|  | #!/usr/bin/env bash | ||||||
|  | 
 | ||||||
|  | # Looks for the Rocket.toml and uses the database url in it to run diesel | ||||||
|  | # commands. | ||||||
|  | 
 | ||||||
|  | while [ ! -f Rocket.toml ]; do | ||||||
|  |     cd .. | ||||||
|  | 
 | ||||||
|  |     if [ "$PWD" == "/" ]; then | ||||||
|  |         echo -e >&2 "\033[31;1merror:\033[0m unable to find a Rocket.toml" | ||||||
|  |         exit 1 | ||||||
|  |     fi | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | url=$(cat Rocket.toml | grep url | cut -d '"' -f 2) | ||||||
|  | 
 | ||||||
|  | diesel --database-url $url $@ | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user