Your second revision using sed finally worked (thank you for sharing), but I should add some comments.
The general steps are:
1._ In fprot.sh, replace the original line from UBCD511:
Code:
URL_UPDATE_SITE=`grep -m 1 -o srv[[:digit:]].directupdates.f-prot.net "${FPROT_TEMPDIR}/fprot-update-link.xml"`
with the suggested (also in one line):
Code:
URL_UPDATE_SITE=`grep -m 1 -o srv[[:digit:]].directupdates.f-prot.net "${FPROT_TEMPDIR}/fprot-update-link.xml" | sed -n '1 p'`
and save it. The name and directory of the script should remain exactly the same as before.
2._ Search for the "ubcd-temp" directory and clean up any residual files, including files in any subdirectories. I clean up the files only, and I leave untouched the (sub)directories themselves. Cleaning up the files only and leaving the directory tree helps reduce some potential errors I found during my tests.
3.A._ If using Windows, go to the folder where fprot.
cmd is located and open a cmd prompt window in there.
3.B._ If using Linux, go to the directory where fprot.
sh is located and open a terminal window in there.
4.A._ If using Windows, type in
Code:
fprot
and press <enter>.
4.B._ If using Linux, the instructions may vary depending on your specific distro. In my case, I type in
Code:
su <enter>
password: <type in your password>
bash ./fprot.sh
5._ Once the definitions are downloaded and updated, type in
Code:
exit <enter>
. In some cases, this step may be needed more than once.
Some additional comments...
I don't know why I needed to run the update as superuser under Linux, but while using my normal user the script failed one way or another. Other distros may not require this condition, and others may use "sudo" instead. YMMV. Ideally, the scripts should also be tested under PartedMagic itself from a UFD.
I will also reproduce here what's already written in the relevant readme.txt for the Linux-based scripts:
Quote:
If you have extracted the iso and if you want to run the scripts in the subfolders,
make sure that they are executable. This is only needed if you run GNU/Linux.
Change to the directory (cd) of this readme file and run:
Code:
chmod a+x ./*/*.sh
chmod a+x ./ubcd2usb/syslinux
chmod a+x ../../../antivir/antivir
I'd like to point out that this script only updates the definitions for fprot; not the program itself. Additionally, I think there is some space for more improvements (and corrections) to the scripts in general. Hopefully they will be applied in future releases of UBCD.