Mailinglist Archive: opensuse-support (159 mails)

< Previous Next >
Re: [opensuse-support] https://software.opensuse.org broken? - alternativ search
I changed a little bit for nicer output the script
in the file "gefunden.txt"
(http links which will be directly usable for yast repos or browsers)

here will be searched for ' clamav'


=================== start of script ======================
#! /bin/bash

newsearch='2' # 0 generate no new index 1=only
Tumbleweed 2=additional search tumbleweed
mithome='1' # 0 no home search 1=with home search

# check for mirrors at: https://mirrors.opensuse.org/list/all.html

# ftp://ftp.gwdg.de/pub/opensuse/repositories/home%3A/ no -R directory
# ftp://ftp.halifax.rwth-aachen.de/opensuse/ -R ok, no home
# ftp://anorien.csc.warwick.ac.uk/download.opensuse.org/ -R ok, and home


echo ''>gefunden.txt
echo ''>gefunden1.txt
echo ''>gefunden1-home.txt

if [ $newsearch == "1" ]
then
lftp -c lftp ftp://ftp.halifax.rwth-aachen.de/opensuse/ -e "ls -R" |grep
Tumbleweed |grep ./ |grep -v i586 |grep -v noarch |grep -v repodata |grep -v
src |grep -v x86_64 |grep -v aarch64 |grep -v armv7hl |grep -v
armv6hl |grep -v i686 |grep -v i386 |grep -v ia64 |grep -v ppc64 |grep -v s390x
|grep -v repocache |grep -v lrwxrwxrwx | tee ftp-directory-tumbleweed.txt
elif [ $newsearch == "2" ]
then
lftp -c lftp ftp://ftp.halifax.rwth-aachen.de/opensuse/ -e "ls -R" |grep
Tumbleweed |grep ./ |grep -v i586 |grep -v noarch |grep -v repodata |grep -v
src |grep -v x86_64 |grep -v aarch64 |grep -v armv7hl |grep -v
armv6hl |grep -v i686 |grep -v i386 |grep -v ia64 |grep -v ppc64 |grep -v s390x
|grep -v repocache |grep -v lrwxrwxrwx | tee ftp-directory-tumbleweed.txt
lftp -c lftp ftp://ftp.halifax.rwth-aachen.de/opensuse/ -e "ls -R" |grep
tumbleweed |grep ./ |grep -v i586 |grep -v noarch |grep -v repodata |grep -v
src |grep -v x86_64 |grep -v aarch64 |grep -v armv7hl |grep -v
armv6hl |grep -v i686 |grep -v i386 |grep -v ia64 |grep -v ppc64 |grep -v s390x
|grep -v repocache |grep -v lrwxrwxrwx | tee -a ftp-directory-tumbleweed.txt
fi


if [ $mithome == "1" ]
then
if [ $newsearch == "1" ]
then
lftp -c lftp
ftp://anorien.csc.warwick.ac.uk/download.opensuse.org/repositories/home%3A/ -e
"ls -R" |grep Tumbleweed |grep ./ |grep -v i586 |grep -v noarch |grep -v
repodata |grep -v src |grep -v x86_64 |grep
-v aarch64 |grep -v armv7hl |grep -v armv6hl |grep -v i686 |grep -v i386 |grep
-v ia64 |grep -v ppc64 |grep -v s390x |grep -v repocache |grep -v lrwxrwxrwx |
tee ftp-directory-home-tumbleweed.txt
elif [ $newsearch == "2" ]
then
lftp -c lftp
ftp://anorien.csc.warwick.ac.uk/download.opensuse.org/repositories/home%3A/ -e
"ls -R" |grep Tumbleweed |grep ./ |grep -v i586 |grep -v noarch |grep -v
repodata |grep -v src |grep -v x86_64 |grep -v
aarch64 |grep -v armv7hl |grep -v armv6hl |grep -v i686 |grep -v i386 |grep -v
ia64 |grep -v ppc64 |grep -v s390x |grep -v repocache |grep -v lrwxrwxrwx | tee
ftp-directory-home-tumbleweed.txt
lftp -c lftp
ftp://anorien.csc.warwick.ac.uk/download.opensuse.org/repositories/home%3A/ -e
"ls -R" |grep tumbleweed |grep ./ |grep -v i586 |grep -v noarch |grep -v
repodata |grep -v src |grep -v x86_64 |grep -v
aarch64 |grep -v armv7hl |grep -v armv6hl |grep -v i686 |grep -v i386 |grep -v
ia64 |grep -v ppc64 |grep -v s390x |grep -v repocache |grep -v lrwxrwxrwx | tee
-a ftp-directory-home-tumbleweed.txt
fi
fi



cat ftp-directory-tumbleweed.txt |while read line; do

#cat test.ttt |while read line; do
laenge=$(echo ${#line} )
echo 'so lang' $laenge
kuerz=$(expr $laenge - 1)
echo 'so kurz' $kuerz
pfadd=$(echo $line |cut -c3-$kuerz)
echo $pfadd >> gefunden1.txt
lftp -c lftp ftp://ftp.halifax.rwth-aachen.de/opensuse/$pfadd/ -e "ls -R"
|grep ' clamav' | tee -a gefunden1.txt
done


cat ftp-directory-home-tumbleweed.txt |while read line; do
#cat test.ttt |while read line; do
laenge=$(echo ${#line} )
echo 'so lang' $laenge
kuerz=$(expr $laenge - 1)
echo 'so kurz' $kuerz
pfadd=$(echo $line |cut -c3-$kuerz)
echo $pfadd >> gefunden1-home.txt
lftp -c lftp
ftp://anorien.csc.warwick.ac.uk/download.opensuse.org/repositories/home%3A/$pfadd/
-e "ls -R" |grep ' clamav' | tee -a gefunden1-home.txt
done



cat gefunden1.txt |while read line; do
linearray=($line)
ersterteil=${linearray[0]}
laengeersterteil=$(echo ${#ersterteil} )
if [ $laengeersterteil == "10" ]
then
teil8=${linearray[8]}
echo 'http://download.opensuse.org/'"$merker"'/ ->
'"$teil8" | tee -a gefunden.txt
else
merker=$line
fi

done


cat gefunden1-home.txt |while read line; do
linearray=($line)
ersterteil=${linearray[0]}
laengeersterteil=$(echo ${#ersterteil} )
if [ $laengeersterteil == "10" ]
then
teil8=${linearray[8]}
echo 'http://download.opensuse.org/repositories/home:/'"$merker"'/
-> '"$teil8" | tee -a gefunden.txt
else
merker=$line
fi

done


rm gefunden1.txt
rm gefunden1-home.txt

====================== end of script =======================================


simoN

--
www.becherer.de
--
To unsubscribe, e-mail: opensuse-support+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-support+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups