diff --git a/bin/mps b/bin/mps index 235da621d..1c49017da 100755 --- a/bin/mps +++ b/bin/mps @@ -1,7 +1,7 @@ #!/bin/bash . /etc/mpsd.conf . /root/bin/fonks.sh -versiyon="0.3" +versiyon="0.4" iletisim="milisarge@gmail.com" paketdepo="/depo/paketler/" sunucu="192.168.1.66:8000/" @@ -86,6 +86,10 @@ paket_sil(){ ryaz 31 "------------------" ters_bagimli_kontrol "$paket" ryaz 31 "------------------" + ryaz 31 "kurban dosyalar" + ryaz 31 "------------------" + silme_kurban_kontrol /tmp/$paket.sil + ryaz 31 "------------------" if [ "$oto_silme" = "evet" ];then sil_onay="e" else @@ -305,6 +309,22 @@ ters_bagimli(){ grep -rli "$ara" "$talimatname_dizin" | cut -d'/' -f`expr $sy + 3` } +silme_kurban_kontrol(){ + local dizin + for f in $(cat $1) ; do + dizin="${f%\'}" + dizin="${dizin#\'}" + if [ -d "$dizin" ];then + for g in `ls "$dizin"` ; do + if ! grep -Fxq " '$dizin/$g'" "$1" + then + echo "$dizin/$g" + fi + done + fi + done +} + ters_bagimli_kontrol(){ ters_bagimli "$1" | sort > tersb.liste ls /var/lib/pkg/DB/ | sed "/$1/d" | sort > simdiki.liste