Browse Source

update function for github

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_fixer
pull/9/head
root 6 years ago
parent
commit
0da1fa9370
  1. 6
      s3
  2. 1
      support/functions/_cmd_build
  3. 4
      support/functions/_misc
  4. 4
      support/functions/_subversion
  5. 88
      support/functions/_update

6
s3

@ -66,7 +66,7 @@ declare -a SHORT_READERS; declare -a SHORT_CARD_READERS; declare -A INTERNAL_
#filled arrays
config_cases=( all addons protocols readers card_readers );
s3opts=( help cedit clean tccheck tcrepair upload lang_select loadonly checkout ssh_profiles syscheck sysinfo svnup menu get_patch tedit svnpatch profiles svnrestore update ); # extendable with plugins
s3opts=( help cedit clean fix_me tccheck tcrepair upload update_me update_emu update_all lang_select loadonly checkout ssh_profiles syscheck sysinfo svnup menu get_patch tedit svnpatch profiles svnrestore update ); # extendable with plugins
CUSTOM_CONFDIR="not_set";
UPX="not_set";
@ -124,6 +124,10 @@ else
for e in "${s3opts[@]}";do
if [ "$e" == "$1" ];then
case $e in
fix_me|\
update_me|\
update_emu|\
update_all|\
svnrestore|\
checkout|\
upload_cam) if [ ! -n "$2" ];then

1
support/functions/_cmd_build

@ -10,7 +10,6 @@ _cmd_build(){
fi;
source "$tccfgdir/$_toolchainname";
_reset_config;
#_fix_config_h;
echo $WH;
ologo >"$ldir/$log_name";

4
support/functions/_misc

@ -21,9 +21,7 @@ timer_stop(){ Te="$(date +%s)";};
timer_start(){ Ts="$(date +%s)";};
decode(){ echo -en "$1" | base64 -d;};
get_module_name(){ echo "${INTERNAL_MODULES[$1]}";};
_fix_config_h(){ _=0;
#_pcsc_off;_stapi5_off;
};
gitrevision(){ svn info $1 |grep Rev: |cut -d " " -f 4;};
_wait(){ echo -e "$w_l";read -n1 -r -p " $txt_help3" key;tput cuu1;echo ' ';}
_systype(){ systype="bad";case "$(uname -m)" in x86|x86_64|amd64|i686) systype="ok";;esac;};
_pcsc_on(){ sed -i 's@^//#define CARDREADER_PCSC 1@#define CARDREADER_PCSC 1@g' "$svndir/config.h";};

4
support/functions/_subversion

@ -32,7 +32,6 @@ checkout(){
echo -en "$w_l""SVN Revision : $y_l""$("$svndir/config.sh" -r) $b_l$mac_$re_\n$w_l SVN UserPath : $y_l""$svndir";
fi;
[ -f "$svndir/config.h" ]&& reset_="$("$svndir/config.sh" -R)";
_fix_config_h;
rm -rf "$fc1";
_nl;
[ -f "$workdir/SVN-IS-PATCHED" ] && rm -f "$workdir/SVN-IS-PATCHED";
@ -91,7 +90,6 @@ svnup(){
fi;
if [ -f "$svndir/config.h" ];then
reset_="$("$svndir/config.sh" -R)";
_fix_config_h;
fi;
};
svnpatch(){
@ -142,7 +140,6 @@ _dialog_checkout(){
[ ! "$upc1" == "1" ] && _dialog_checkout1;
if [ -f "$svndir/config.sh" ];then
reset_="$("$svndir/config.sh" -R)";
_fix_config_h;
fi;
_get_config_menu;
fi;
@ -186,7 +183,6 @@ done < <(svn co "$trunkurl" "$svndir" $_rev| sed "s@$svndir@@g"| awk '{print $2}
if [ -f "$svndir/config.sh" ];then
reset_="$("$svndir/config.sh" -R)";
echo "Revision: $(REVISION) done...";
_fix_config_h;
[ -f "$workdir/SVN-IS-PATCHED" ] && rm -f "$workdir/SVN-IS-PATCHED";
_get_config_menu;
fi;));

88
support/functions/_update

@ -1,38 +1,66 @@
#!/bin/bash
start_update(){
update_me(){
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;
local_revision=0;
online_revision=0;
source "$configdir/urls";
s3local="$dldir/s3_github";
echo -en " s3_git CHECK:\n -------------\n";
if [ -d "$s3local/.svn" ]; then
local_revision=$(gitrevision $s3local);
fi
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(){
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";
update_emu(){
clear;s3logo;
local_revision=0;
online_revision=0;
source "$configdir/urls";
emulocal="$dldir/emu_github";
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;
}
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;
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
echo -e "$w_l\n NO NEW VERSION FOUND$re_\n";
fi;
update_me;
fix_me;
fi
}
update_all(){
update_me;
update_emu;
}

Loading…
Cancel
Save