mps.guncelleme

This commit is contained in:
milisman 2017-01-29 20:47:24 +02:00
parent 7b82df4d82
commit 1a1235e095
1 changed files with 32 additions and 2 deletions

34
bin/mps
View File

@ -4,7 +4,7 @@ if [ -f /etc/mps.conf ];then
. /etc/mps.conf . /etc/mps.conf
fi fi
. /root/bin/fonks.sh . /root/bin/fonks.sh
versiyon="0.8.6" versiyon="0.8.7"
iletisim="milisarge@gmail.com" iletisim="milisarge@gmail.com"
paketdepo="/depo/paketler/" paketdepo="/depo/paketler/"
if [ -z ${sunucu+:} ]; then if [ -z ${sunucu+:} ]; then
@ -128,7 +128,6 @@ paket_sil(){
rm -f /tmp/$paket.sil rm -f /tmp/$paket.sil
else else
rm -f /tmp/$paket.sil rm -f /tmp/$paket.sil
exit 1
fi fi
else else
@ -337,6 +336,14 @@ paket_sil_oto(){
done done
} }
paket_sil_oto_onayli(){
local spkt
cat $1
for spkt in `cat $1`;do
paket_sil "$spkt"
done
}
paket_guncelle(){ paket_guncelle(){
surum_kontrol $1 surum_kontrol $1
devir_kontrol $1 devir_kontrol $1
@ -492,6 +499,24 @@ bagimli_bilgi(){
} }
bagimli_bilgi_dosyala(){
rm -f "$1.gerekler.liste"
local bagimd konum bag
konum="`find "$talimatname_dizin" -name $1`"
bagimd=`cat $konum/talimat | grep "Depends" | cut -d':' -f2`
if [ -n "$bagimd" ]; then
bagimd=`echo "$bagimd" | sed 's/,/ /g'`
#sıralı gösterme
#echo `echo "$bagimd" | sed 's/,/ /g'`
#kurulu kontrollu gosterim
for bag in $bagimd;do
echo $bag >> "$1.gerekler.liste"
done
fi
echo "$1" >> "$1.gerekler.liste"
}
ters_bagimli(){ ters_bagimli(){
local ara local ara
ara=" $1 " ara=" $1 "
@ -960,6 +985,9 @@ ayarlar() {
paket_sil "$2" ;; paket_sil "$2" ;;
-sz|zorsil) -sz|zorsil)
paket_sil "$2" "evet";; paket_sil "$2" "evet";;
-S|silgrub)
mps -bbd "$2"
paket_sil_oto_onayli "$2.gerekler.liste" ;;
-pa|ara) -pa|ara)
paket_ara "$2" ;; paket_ara "$2" ;;
bul) bul)
@ -1106,6 +1134,8 @@ ayarlar() {
ryaz 32 $sunucu ;; ryaz 32 $sunucu ;;
-bb|--pkbb) -bb|--pkbb)
bagimli_bilgi "$2" | column -t;; bagimli_bilgi "$2" | column -t;;
-bbd)
bagimli_bilgi_dosyala "$2" ;;
-tb|--pktb) -tb|--pktb)
ters_bagimli "$2" ;; ters_bagimli "$2" ;;
-tbk|--pktbk) -tbk|--pktbk)