mps-esgec

This commit is contained in:
milisbir 2018-01-29 04:01:15 +02:00
parent 2d2fee46b5
commit 4509a2f14e
1 changed files with 16 additions and 17 deletions

33
bin/mps
View File

@ -1197,29 +1197,25 @@ guncelleme_tespit(){
sistem_guncelle(){ sistem_guncelle(){
count=0 count=0
local kpkt local kpkt _pkliste
local pk_guncelle
total=`ls $VT | wc -l` total=`ls $VT | wc -l`
pstr="[=======================================================================]" pstr="[=======================================================================]"
git_guncelle git_guncelle
paketvt_guncelle paketvt_guncelle
GS_CIKTI="H" GS_CIKTI="H"
_pkliste=$(mktemp)
ls -rct $VT > ${_pkliste}
for _esgec in `echo ${esgec} | tr " " "\n"`;do
_satirno=$(grep -wxnr "${_esgec}" ${_pkliste} | cut -d':' -f1)
[ ! -z ${_satirno} ] && sed -i "${_satirno}d" ${_pkliste}
done
while [ $count -lt $total ]; do while [ $count -lt $total ]; do
count=$(( $count + 1 )) count=$(( $count + 1 ))
pd=$(( $count * 73 / $total )) pd=$(( $count * 73 / $total ))
printf "\r%3d.%1d%% %.${pd}s" $(( $count * 100 / $total )) $(( ($count * 1000 / $total) % 10 )) $pstr printf "\r%3d.%1d%% %.${pd}s" $(( $count * 100 / $total )) $(( ($count * 1000 / $total) % 10 )) $pstr
kpkt=$(ls -rct $VT | tr " " "\n" | sed -n ${count}'p') kpkt=$(sed -n ${count}'p' ${_pkliste})
pk_guncelle="e" paket_guncelle "$kpkt" $GS_CIKTI
if [[ "${esgec[*]}" =~ "${kpkt}" ]];then
pk_guncelle="h"
fi
if [ "$pk_guncelle" = "e" ];then
paket_guncelle "$kpkt" $GS_CIKTI
#printf "."
else
[ $GS_CIKTI = "E" ] && ryaz 31 $kpkt "güncellemesi atlandı"
#ryaz 31 "$kpkt atlandı"
fi
done done
ryaz 32 "\nSistem Güncellemesi Tamamlandı." ryaz 32 "\nSistem Güncellemesi Tamamlandı."
} }
@ -1402,9 +1398,12 @@ surum_devir_kontrol(){
if [ "$_konum" = "-1" ];then if [ "$_konum" = "-1" ];then
echo "$_paket $_talimat_bulunamadi $_surum_kontrol_iptal" echo "$_paket $_talimat_bulunamadi $_surum_kontrol_iptal"
else else
if [[ "${esgec[*]}" =~ "${_paket}" ]];then for _esgec in `echo ${esgec} | tr " " "\n"`;do
pk_guncelle="h" if [ "${_esgec}" = ${_paket} ];then
fi pk_guncelle="h"
break
fi
done
if [ $pk_guncelle == "e" ];then if [ $pk_guncelle == "e" ];then
source $_konum/talimat source $_konum/talimat
if [ "${_durum}" == "yaz" ];then if [ "${_durum}" == "yaz" ];then