diff options
author | M.Gergo | 2019-03-08 23:32:47 +0100 |
---|---|---|
committer | M.Gergo | 2019-03-08 23:32:47 +0100 |
commit | c0f79397dd75e03a7a40303f82926e8187697d07 (patch) | |
tree | e945a10ef6479e0f8720ad9cd4947b6a85b78d6e /checkupdate.sh | |
parent | f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0 (diff) | |
download | mayor-c0f79397dd75e03a7a40303f82926e8187697d07.tar.gz mayor-c0f79397dd75e03a7a40303f82926e8187697d07.zip |
Rev: 4455
Diffstat (limited to 'checkupdate.sh')
-rwxr-xr-x | checkupdate.sh | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/checkupdate.sh b/checkupdate.sh index 5e20e8bd..d6ab116e 100755 --- a/checkupdate.sh +++ b/checkupdate.sh @@ -2,34 +2,37 @@ orev=$(cat rev.txt) -nrev=$(wget http://www.mayor.hu/download/rev.txt -O -) +nrev=$(wget http://www.mayor.hu/download/current/md5sum -O - | grep 'Revision' | cut -d ' ' -f 2) pd=$(pwd) if [ "$nrev" -gt "$orev" ]; then - wget http://www.mayor.hu/download/rev.txt -O rev.txt + wget http://www.mayor.hu/download/current/rev.txt -O rev.txt + wget http://www.mayor.hu/download/current/md5sum -O mayor-orig/md5sum - cd /tmp/ - wget http://www.mayor.hu/download/current/mayor-base-current.tgz - wget http://www.mayor.hu/download/current/mayor-naplo-current.tgz - wget http://www.mayor.hu/download/current/mayor-portal-current.tgz - - wget http://www.mayor.hu/download/current/mayor-installer-current.tgz - - cd $pd/mayor-installer-orig/ - tar -xzf /tmp/mayor-installer-current.tgz + cd /tmp + + for i in $(cat "$pd"/mayor-orig/md5sum | tail -n+2 | cut -d ' ' -f 3); do + + j=$(echo $i | sed -e 's/-rev.*//g') + wget http://www.mayor.hu/download/current/"$i" + if [ ! -d "$pd/mayor-orig/$i" ]; then + mkdir "$pd"/mayor-orig/"$j" + fi + tar -xzvf /tmp/"$i" -C "$pd"/mayor-orig/"$j" + + done - cd $pd/mayor-orig/ - tar -xzf /tmp/mayor-base-current.tgz - tar -xzf /tmp/mayor-naplo-current.tgz - tar -xzf /tmp/mayor-portal-current.tgz - cd $pd + cp -f 'rev.txt' 'mayor-orig/rev.txt' + cp -rf 'mayor-installer/mayor-installer-orig/log/' 'mayor-installer/mayor-installer-jav/' + cp -rf 'mayor-installer/mayor-installer-orig/log/' 'mayor-installer/mayor-installer-for-fcgi/' + git add --all git commit -a -m "Rev: $nrev" - + fi |