From 1f77e8db062ea5116d9e76a81f673ff2705596d0 Mon Sep 17 00:00:00 2001 From: gorgone Date: Wed, 20 Feb 2019 23:43:33 +0100 Subject: [PATCH] add update function part 1 TEST! --- support/functions/_update | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 support/functions/_update diff --git a/support/functions/_update b/support/functions/_update new file mode 100644 index 0000000..0c42786 --- /dev/null +++ b/support/functions/_update @@ -0,0 +1,16 @@ +#!/bin/bash + +update(){ +clear;s3logo;LOCALVERSIONCOUNTER=$VERSIONCOUNTER; +source <(wget -qO- 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_"; + +if [ $LOCALVERSIONCOUNTER -lt $VERSIONCOUNTER ];then + echo -e "$R\n NEW VERSION FOUND\n\n$w_l UPDATE$G 1=YES$w_l /$R 2=NO\n$re_"; +else + echo -e "$w_l\n NO NEW VERSION FOUND$re_\n"; +fi; +}