milis/bin/komutan-kur

46 lines
705 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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