From eda9d0ccda758e677fd0f1f67942057339c5ca99 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Thu, 26 Mar 2020 03:24:16 +0100 Subject: checkupdate --- checkupdate.sh | 48 ++++++++++++------------ "egy\303\251b/nextcloud/mayor-nextcloud.cfg.php" | 2 +- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/checkupdate.sh b/checkupdate.sh index c79ce5f8..f094e685 100755 --- a/checkupdate.sh +++ b/checkupdate.sh @@ -3,40 +3,42 @@ git checkout MaYor-dev -orev=$(cat rev.txt) -nrev=$(wget http://www.mayor.hu/download/current/md5sum -O - | grep 'Revision' | cut -d ' ' -f 2) +if [ $? == 0 ]; then + orev=$(cat rev.txt) + nrev=$(wget http://www.mayor.hu/download/current/md5sum -O - | grep 'Revision' | cut -d ' ' -f 2) -pd=$(pwd) + pd=$(pwd) -if [ "$nrev" -gt "$orev" ]; then + if [ "$nrev" -gt "$orev" ]; then - wget http://www.mayor.hu/download/current/rev.txt -O rev.txt - wget http://www.mayor.hu/download/current/md5sum -O mayor-orig/md5sum + 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 + cd /tmp - for i in $(cat "$pd"/mayor-orig/md5sum | tail -n+2 | cut -d ' ' -f 3); do + 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 + 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 - 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/' + 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" - git tag -a "rev$nrev" -m "Rev: $nrev" + git add --all + git commit -a -m "Rev: $nrev" + git tag -a "rev$nrev" -m "Rev: $nrev" + fi fi git checkout master diff --git "a/egy\303\251b/nextcloud/mayor-nextcloud.cfg.php" "b/egy\303\251b/nextcloud/mayor-nextcloud.cfg.php" index 087ea7fb..d8092054 100644 --- "a/egy\303\251b/nextcloud/mayor-nextcloud.cfg.php" +++ "b/egy\303\251b/nextcloud/mayor-nextcloud.cfg.php" @@ -16,7 +16,7 @@ $db['nxt_dbname'] = "Nextcloud"; $db['nxt_prefix'] = "oc_"; //$db['mayor_host'] = ""; //$db['mayor_port'] = ""; -//$db['mayor_user'] = ""; +//$db['mayor_user'] = ""; //$db['mayor_pass'] = ""; $m2n['min_evfolyam'] = 1; -- cgit v1.2.3