-
Notifications
You must be signed in to change notification settings - Fork 0
/
rupdater.sh
executable file
·47 lines (39 loc) · 1.83 KB
/
rupdater.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# @(#) $Id: rupdater.sh,v 1.24 2024/09/15 10:24:59 ralph Exp $
# --=-----------------------------------------------------------------------=---
# (c) 1997-2024 by Ralph Roth -*- http://rose.rult.at -*-
# This script is maintained at: https://github.com/roseswe/rupdater
# There is no integrated update mechanism for our programs. You can use the
# shell script "rupdater.sh" if you have a *NIX environment to download updates
# of the program.
echo "ROSE SWE automatic software updater for Linux, WSL2 or Windows/Cygwin using wget/awk"
URL=http://rose-swe.bplaced.net/dl
# -N, --timestamping don't re-retrieve files unless newer than
wget -qN ${URL}/md5sums.md5 > /dev/null 2>&1 || exit 1
dos2unix md5sums.md5 2> /dev/null ## in the case we had used the win32 version of dir2html?
## 2022: removed: f_mirc, CrCheck, HackStop
## 2024: added missing Viba, rvct
## Main/interesting programs:
for i in rhbvs rms favboot AntiLink rfwt_ VirScanPlus MemScan viba hashall Hashall MPScan dir2html rADFAQ rPCP rUPP rupdater.sh rvct_ CrCheck
do
FILE=$(gawk ' $2 ~ /'${i}'/ { print $2; }; ' md5sums.md5|tail -1)
## echo "$i=$FILE" # debug
if [ "$FILE" != "" ]
then
if [ ! -r "${FILE}" ]
then
echo "[!!] ${FILE}: Trying to download new/updated file"
timeout 18m wget -qN -c "${URL}/${FILE}" # rms/100mb might timeout?
else
echo "[OK] ${FILE}: No newer version available!"
fi
fi
done
echo ""
echo "Downloading finished, checking the downloaded files with MD5SUM..."
md5sum --quiet -c md5sums.md5 # prints only corrupted files
rc=$?
exit $rc
# $Header: /home/cvs/src/prj/rupdater/rupdater.sh,v 1.24 2024/09/15 10:24:59 ralph Exp $
# ------------------------------------------------------------------------
# vim:set fenc=utf8 ff=unix ft=shell ts=2 et: