komutan-kur
This commit is contained in:
		
							parent
							
								
									ba59f16ee0
								
							
						
					
					
						commit
						b203561906
					
				
					 1 changed files with 45 additions and 0 deletions
				
			
		
							
								
								
									
										45
									
								
								bin/komutan-kur
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										45
									
								
								bin/komutan-kur
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,45 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					paketdepo="/var/lib/pkg/DB"
 | 
				
			||||||
 | 
					depo="https://notabug.org/milisarge/komutan"
 | 
				
			||||||
 | 
					kuryer="/opt/komutan-0" 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					elixir_hata(){
 | 
				
			||||||
 | 
						echo "elixir kurulamadı. Tekrar deneyiniz."
 | 
				
			||||||
 | 
						exit 1
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					git_hata(){
 | 
				
			||||||
 | 
						echo "komutan indirilemedi. Tekrar deneyiniz"
 | 
				
			||||||
 | 
						exit 1
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					komutan_gerekler(){
 | 
				
			||||||
 | 
						sudo mix local.rebar --force
 | 
				
			||||||
 | 
						sudo mix local.hex --force
 | 
				
			||||||
 | 
						sudo mix deps.get
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					komutan_calistir(){
 | 
				
			||||||
 | 
						cd ${kuryer}
 | 
				
			||||||
 | 
						komutan_gerekler
 | 
				
			||||||
 | 
						sudo iex -S mix
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ ! -d ${paketdepo}/elixir ];then 
 | 
				
			||||||
 | 
						mps guncelle && mps kur elixir
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[ ! -d ${paketdepo}/elixir ] && elixir_hata
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -d ${kuryer} ];then
 | 
				
			||||||
 | 
						cd ${kuryer} && sudo git pull
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
						sudo git clone ${depo} ${kuryer}
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -d ${kuryer} ];then
 | 
				
			||||||
 | 
						komutan_calistir
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
						git_hata
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue