Merge branch 'master' of http://git.sdf.org:3000/smallm/getshows
Also add entry in README for getviaphone
This commit is contained in:
commit
d1ff573ea5
16
Makefile
16
Makefile
@ -1,9 +1,19 @@
|
|||||||
|
frfac:
|
||||||
|
sed "1d;2i #!`./latest_perl`" frfac.in > frfac
|
||||||
|
|
||||||
check:
|
check:
|
||||||
perl -wc frfac
|
`./latest_perl` -wc frfac.in
|
||||||
perlcritic frfac
|
perlcritic frfac.in
|
||||||
ksh93 -n getviaphone
|
ksh93 -n getviaphone
|
||||||
|
|
||||||
install:
|
install: frfac
|
||||||
sudo install -o root -g wheel -m 0755 -d /usr/local/bin
|
sudo install -o root -g wheel -m 0755 -d /usr/local/bin
|
||||||
sudo install -o root -g wheel -m 0555 frfac /usr/local/bin
|
sudo install -o root -g wheel -m 0555 frfac /usr/local/bin
|
||||||
sudo install -o root -g wheel -m 0555 getviaphone /usr/local/bin
|
sudo install -o root -g wheel -m 0555 getviaphone /usr/local/bin
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f frfac
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
sudo rm -f /usr/local/bin/frfac
|
||||||
|
sudo rm -f /usr/local/bin/getviaphone
|
||||||
|
1
README
1
README
@ -3,3 +3,4 @@ Scripts to extract media URLs from websites
|
|||||||
1. frfac - url of most recent Français Facile episode from RFI.
|
1. frfac - url of most recent Français Facile episode from RFI.
|
||||||
Usage: ftp $(frfac)
|
Usage: ftp $(frfac)
|
||||||
(or substitute another downloader for ftp.)
|
(or substitute another downloader for ftp.)
|
||||||
|
2. getviaphone - download a file via my phone.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/pkg/bin/perl
|
#!/usr/bin/perl
|
||||||
# Print the URI of the most recent rfi francais facile episode.
|
# Print the URI of the most recent rfi francais facile episode.
|
||||||
# Feed this to a downloader. (This script doesn't itself download.)
|
# Feed this to a downloader. (This script doesn't itself download.)
|
||||||
|
|
15
latest_perl
Executable file
15
latest_perl
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
bestv=0
|
||||||
|
for p in $(whereis perl)
|
||||||
|
do
|
||||||
|
if [ "$p" != "${p%bin/perl}" ];
|
||||||
|
then
|
||||||
|
v=$($p -V:PERL_VERSION | sed "s/[^']*'//;s/'.*\$//")
|
||||||
|
if [ $v -gt $bestv ]; then
|
||||||
|
best=$p
|
||||||
|
bestv=$($p -V:PERL_VERSION |
|
||||||
|
sed "s/[^']*'//;s/'.*\$//")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo $best
|
Loading…
Reference in New Issue
Block a user