md5sum-kontrol
This commit is contained in:
parent
a3570d7a40
commit
5569d7ee0a
1 changed files with 9 additions and 2 deletions
11
bin/mps
11
bin/mps
|
@ -682,11 +682,12 @@ ana(){
|
||||||
ayarlar "$@"
|
ayarlar "$@"
|
||||||
|
|
||||||
if [ "$ikaynak" = "ag" ]; then
|
if [ "$ikaynak" = "ag" ]; then
|
||||||
|
local kontroldeg
|
||||||
kkont=`kurulu_kontrol "$2"`
|
kkont=`kurulu_kontrol "$2"`
|
||||||
if [ "$kkont" = "degil" ] || [ "$tekrarkur" = "evet" ];then
|
if [ "$kkont" = "degil" ] || [ "$tekrarkur" = "evet" ];then
|
||||||
echo "agdan cekiliyor:" "$2"
|
echo "agdan cekiliyor:" "$2"
|
||||||
pkt=`cat "$paketdepo""paket.vt" | grep "^$2 " | cut -d' ' -f3`
|
pkt=`cat "$paketdepo""paket.vt" | grep "^$2 " | cut -d' ' -f3`
|
||||||
echo $pkt
|
echo $pkt
|
||||||
if [ ! -z "$pkt" -a "$pkt" != "" ]; then
|
if [ ! -z "$pkt" -a "$pkt" != "" ]; then
|
||||||
cpaket="${pkt/'#'/'%23'}"
|
cpaket="${pkt/'#'/'%23'}"
|
||||||
#paket sunucuda varsa
|
#paket sunucuda varsa
|
||||||
|
@ -694,7 +695,12 @@ if [ "$ikaynak" = "ag" ]; then
|
||||||
#if wget -P /tmp -q "$sunucu$cpaket" > /dev/null; then
|
#if wget -P /tmp -q "$sunucu$cpaket" > /dev/null; then
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
wget -nc -P "$paketdepo" "$sunucu$cpaket"
|
wget -nc -P "$paketdepo" "$sunucu$cpaket"
|
||||||
#mv /tmp/$pkt "$paketdepo"
|
ekontdeg=`cat "$paketdepo""paket.vt" | grep "^$2 " | cut -d' ' -f2`
|
||||||
|
mkontdeg=`md5sum $pkt | cut -d' ' -f1`
|
||||||
|
if [ "$ekontdeg" != "$mkontdeg" ];then
|
||||||
|
rm -f $pkt
|
||||||
|
wget -nc -P "$paketdepo" "$sunucu$cpaket"
|
||||||
|
fi
|
||||||
if [ "$kurulum_onay" = "evet" ];then
|
if [ "$kurulum_onay" = "evet" ];then
|
||||||
if [ "$tekrarkur" = "evet" ];then
|
if [ "$tekrarkur" = "evet" ];then
|
||||||
paket_sil "$2" "evet"
|
paket_sil "$2" "evet"
|
||||||
|
@ -702,6 +708,7 @@ if [ "$ikaynak" = "ag" ]; then
|
||||||
icerik_ekle "$paketdepo$pkt"
|
icerik_ekle "$paketdepo$pkt"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
ryaz 31 "paket sunucuda yok!( mps -G komutuyla güncelleme yapınız. )"
|
ryaz 31 "paket sunucuda yok!( mps -G komutuyla güncelleme yapınız. )"
|
||||||
|
|
Loading…
Add table
Reference in a new issue