You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.4 KiB

#!/bin/bash
start_update(){
clear;s3logo;
echo -e $w_l"$txt_loading\t-->\t $Y$filename";
url="https://github.com/gorgone/s3_releases/archive/s3_rc5.1.tar.gz";
cd "$dldir";echo -e $P;
wget -N --no-hsts --https-only --progress=dot "$url" 2>&1 |grep --line-buffered "%" |awk '{ printf "\033["'9'";"'41'"H\033[K > %-4s", $7;}';
tput cup 8 40;echo -en $G"$txt_done ";
echo -en $w_l"\n $txt_check\t-->\t $Y$filename";echo -en $G"\t OK";sleep 1;
echo -en $w_l"\n $txt_extracting\t-->\t $Y$filename";
echo -en $G" $txt_done\n\n$re_";
sleep 3;
}
update(){
clear;s3logo;LOCALVERSIONCOUNTER=$VERSIONCOUNTER;
source <(wget -qO- --no-cache --no-cookies https://raw.githubusercontent.com/gorgone/s3_update/master/lastversion);
echo -e "$w_l\n latest online Version ---> $SIMPLEVERSION\n =====================";
filename=$(echo "$_md5sum" | awk '{printf $2}';);
echo -e "$C filename\t\t ---> $filename\n ========";
echo -e "$Y Version Counter ---> $VERSIONCOUNTER\n ===============$re_\n";
if [ $LOCALVERSIONCOUNTER -lt $VERSIONCOUNTER ];then
for i in "${whatsnew[*]}"
do
echo -e " $w_l$i$re_";
done
echo -e "$R\n NEW VERSION FOUND\n\n$w_l UPDATE$G 1=YES$w_l /$R 2=NO\n$re_";
read -n1 -p " -> " key;
case "$key" in
1) echo -e " start Update\n"; start_update;;
*) echo -e " no Update\n";;
esac;
else
echo -e "$w_l\n NO NEW VERSION FOUND$re_\n";
fi;
}