Browse Source
add ./s3 update_me add ./s3 update_emu add ./s3 fix_me update_me creats support/downloads/s3_github folder mirror - autoupdate local files s3 + support folder update_emu creats support/downloads/emu_github folder mirror fix_me overwrite all files with the local s3_github files remove config_h_fixerpull/9/head
root
6 years ago
5 changed files with 66 additions and 41 deletions
@ -1,38 +1,66 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
|
|
||||
start_update(){ |
update_me(){ |
||||
clear;s3logo; |
clear;s3logo; |
||||
echo -e $w_l"$txt_loading\t-->\t $Y$filename"; |
local_revision=0; |
||||
url="https://github.com/gorgone/s3_releases/archive/s3_rc5.1.tar.gz"; |
online_revision=0; |
||||
cd "$dldir";echo -e $P; |
source "$configdir/urls"; |
||||
wget -N --no-hsts --https-only --progress=dot "$url" 2>&1 |grep --line-buffered "%" |awk '{ printf "\033["'9'";"'41'"H\033[K > %-4s", $7;}'; |
s3local="$dldir/s3_github"; |
||||
tput cup 8 40;echo -en $G"$txt_done "; |
echo -en " s3_git CHECK:\n -------------\n"; |
||||
echo -en $w_l"\n $txt_check\t-->\t $Y$filename";echo -en $G"\t OK";sleep 1; |
if [ -d "$s3local/.svn" ]; then |
||||
echo -en $w_l"\n $txt_extracting\t-->\t $Y$filename"; |
local_revision=$(gitrevision $s3local); |
||||
echo -en $G" $txt_done\n\n$re_"; |
fi |
||||
sleep 3; |
online_revision=$(gitrevision $s3url); |
||||
|
if [ ! $local_revision == $online_revision ]; then |
||||
|
echo -en " update s3_git to\n Local Revision: $online_revision\n"; |
||||
|
svn -q checkout "$s3url" "$s3local"; |
||||
|
cd "$s3local"; |
||||
|
echo -en " update all files ...\n\n"; |
||||
|
yes | cp -rf s3 "$workdir/s3"; |
||||
|
yes | cp -rf support "$workdir/support"; |
||||
|
else |
||||
|
echo -en " is up to date\n Online Revision: $online_revision\n\n"; |
||||
|
fi |
||||
} |
} |
||||
|
|
||||
update(){ |
update_emu(){ |
||||
clear;s3logo;LOCALVERSIONCOUNTER=$VERSIONCOUNTER; |
clear;s3logo; |
||||
source <(wget -qO- --no-cache --no-cookies https://raw.githubusercontent.com/gorgone/s3_update/master/lastversion); |
local_revision=0; |
||||
echo -e "$w_l\n latest online Version ---> $SIMPLEVERSION\n ====================="; |
online_revision=0; |
||||
filename=$(echo "$_md5sum" | awk '{printf $2}';); |
source "$configdir/urls"; |
||||
echo -e "$C filename\t\t ---> $filename\n ========"; |
emulocal="$dldir/emu_github"; |
||||
echo -e "$Y Version Counter ---> $VERSIONCOUNTER\n ===============$re_\n"; |
echo -en " emu_git CHECK:\n --------------\n"; |
||||
|
if [ -d "$emulocal/.svn" ]; then |
||||
|
local_revision=$(gitrevision $emulocal); |
||||
|
fi |
||||
|
online_revision=$(gitrevision $emuurl); |
||||
|
if [ ! $local_revision == $online_revision ]; then |
||||
|
echo -en " update emu_git to\n Local Revision: $online_revision\n\n"; |
||||
|
svn -q checkout "$emuurl" "$emulocal"; |
||||
|
else |
||||
|
echo -en " is up to date\n Online Revision: $online_revision\n\n"; |
||||
|
fi |
||||
|
sleep 1; |
||||
|
cd "$emulocal"; |
||||
|
ls; |
||||
|
} |
||||
|
|
||||
|
fix_me(){ |
||||
|
clear;s3logo; |
||||
|
source "$configdir/urls"; |
||||
|
s3local="$dldir/s3_github"; |
||||
|
if [ -d "$s3local/.svn" ];then |
||||
|
cd "$s3local"; |
||||
|
echo -en " overwrite all files ...\n\n"; |
||||
|
yes | cp -rf s3 "$workdir/s3"; |
||||
|
yes | cp -rf support "$workdir/support"; |
||||
|
else |
||||
|
update_me; |
||||
|
fix_me; |
||||
|
fi |
||||
|
} |
||||
|
|
||||
if [ $LOCALVERSIONCOUNTER -lt $VERSIONCOUNTER ];then |
update_all(){ |
||||
for i in "${whatsnew[*]}" |
update_me; |
||||
do |
update_emu; |
||||
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; |
|
||||
} |
} |
||||
|
Loading…
Reference in new issue