^ This is what you should get:
Code: Select all
guest@porteus:~$ sed "s/\s*kpv\s*().*/masm \$*/;T;q" safm.sh > masm.sh
guest@porteus:~$ sh masm.sh slacky http://slack.isper.sk/pub
Done!
slacky mirror set to: http://slack.isper.sk/pub
Quoted your message, copied the msam.sh text from code block, and pasted into terminal:
- Got something suspicious at end about an event not being found:
Code: Select all
> # Unblock Selected Just Once
> sudo sed -i "0,\%^\s*#\s*$url%s??$url?" /etc/usm/mirrors-$1.txt
> echo Done!; echo $1 mirror set to: $(grep -E "^\s*(http|ftp)" /etc/usm/mirrors-$1.txt); # Providing more accurate information 2017-06-17 15:46:39
bash: !: event not found
> }
guest@porteus:~$ masm $*
Argument usage: <Repository> <Mirror URL>
- Invocation of masm gives no output, and check of repo mirror shows mirror with strange character at end
Code: Select all
guest@porteus:~$ masm slacky http://slack.isper.sk/pub
guest@porteus:~$ source crm.sh slacky
SLACKY
Mirror: http://slack.isper.sk/pub
\2 Commented Out
- After being properly set, mirror looks like his:
Code: Select all
guest@porteus:~$ source crm.sh slacky
SLACKY
Mirror: http://slack.isper.sk/pub
2 Commented Out
Looks like we are going round in circles:
http://forum.porteus.org/viewtopic.php? ... =15#p56120 Please bear in mind that your windoze file has to be made unix compatible before processing by a unix text processing utility.,
http://forum.porteus.org/viewtopic.php? ... =15#p56140
So, get rid of all that windoze impurity firstly, before entering pristine environment of unix:
Code: Select all
tr -d '\15\32' < USM/safm.sh | sed "s/\s*kpv\s*().*/masm \$*/;T;q" > masm.sh
also have to do same with safm.sh:
Code: Select all
cd USM; cp safm.sh safm.wdz
tr -d '\15\32' < safm.wdz > safm.sh
BTW Ran script to set fastest slacware mirrors (aka sesm.sh), with geographic and 20 worst slackware mirrors on top of 30 from before excluded, also 3 salix worst mirrors excluded, and got timing of under 1 min:
Code: Select all
guest@porteus:~$ time source sesm.sh all http://slack.isper.sk/pub
Exclusion URL Specified on Command Line:
http://slack.isper.sk/pub
All Exclusion URLs:
Cmd Line URLs=1 File (.usm/badmirrors.txt) URLs=87 Merged(Unique) URLs=88
SLACKWARE
Testing ftp://elektroni.phys.tut.fi/ 1.138931
Mirrors=152 Processed=38 Remaining=114
Testing http://ftp.heanet.ie/mirrors/ftp.slackware.com/pub/slackware/ 0.168943
Mirrors=152 Processed=63 Remaining=89
Testing ftp://sunsite.icm.edu.pl/vol/rzm1/linux-slackware/ 0.548795
Mirrors=152 Processed=88 Remaining=64
Testing http://mirrors.easynews.com/linux/slackware/ 0.607301
Mirrors=152 Processed=135 Remaining=17
Done!
slackware mirror set to: http://mirror.ovh.net/mirrors/ftp.slackware.com/
SLACKWAREPATCHES
Done!
slackwarepatches mirror set to: http://mirror.ovh.net/mirrors/ftp.slackware.com/
SLACKY
Done!
slacky mirror set to: http://repository.slacky.eu/
SALIX
Testing ftp://ftp.mirrorservice.org/sites/download.salixos.org 0.592528
Mirrors=28 Processed=9 Remaining=19
Testing ftp://ftp.nluug.nl/pub/os/Linux/distr/salix 0.596608
Mirrors=28 Processed=19 Remaining=9
Testing http://mirrors.xmission.com/salix 0.357440
Mirrors=28 Processed=26 Remaining=2
Done!
salix mirror set to: http://ftp.nluug.nl/os/Linux/distr/salix
ALIEN
Done!
alien mirror set to: http://bear.alienbase.nl/mirrors/people/alien/sbrepos
PONCE
Done!
ponce mirror set to: http://ponce.cc/slackware
SLACKONLY
Done!
slackonly mirror set to: http://packages.slackonly.com/pub/packages
SBO
Done!
sbo mirror set to: http://slackbuilds.org/slackbuilds
real 0m52.209s
user 0m1.935s
sys 0m1.349s
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB