improve nnl filter, add check to see if curl is installed
This commit is contained in:
parent
c0e7f7c24d
commit
931b57de7f
6
nnl
6
nnl
|
@ -2,6 +2,10 @@
|
|||
|
||||
# New Norwegian linter
|
||||
|
||||
if [ ! `command -v curl &>/dev/null` ]; then
|
||||
echo "no curl installation found!" && exit 1
|
||||
fi
|
||||
|
||||
input_file="$(cat $1)"
|
||||
|
||||
get_page() {
|
||||
|
@ -11,7 +15,7 @@ get_page() {
|
|||
no_errors=1
|
||||
|
||||
for token in $input_file; do
|
||||
word="$(echo $token | sed 's/\.//g')"
|
||||
word="$(echo $token | sed 's/[\.\,\;\:\!\?]//g')"
|
||||
get_page "$word" | grep "class=\"ikkefunnet\"" >/dev/null
|
||||
status=$?
|
||||
if [ 0 -eq $status ]; then
|
||||
|
|
Loading…
Reference in New Issue