mirror of
https://github.com/bol-van/zapret.git
synced 2025-01-03 04:49:55 +00:00
ipset: script maintenance
This commit is contained in:
parent
50616896c8
commit
5df9b5d109
12
ipset/def.sh
12
ipset/def.sh
@ -141,6 +141,18 @@ zzsize()
|
|||||||
printf 0
|
printf 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
zzcopy()
|
||||||
|
{
|
||||||
|
local is_gz=0
|
||||||
|
zztest "$1" && is_gz=1
|
||||||
|
if [ "$GZIP_LISTS" = 1 -a $is_gz = 1 ]; then
|
||||||
|
cp "$1" "${2}.gz"
|
||||||
|
elif [ "$GZIP_LISTS" != 1 -a $is_gz != 1 ]; then
|
||||||
|
cp "$1" "$2"
|
||||||
|
else
|
||||||
|
zzcat "$1" | zz "$2"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
digger()
|
digger()
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@ dl()
|
|||||||
echo list is too small : $dlsize bytes. can be bad.
|
echo list is too small : $dlsize bytes. can be bad.
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
zzcat "$TMPLIST" | zz "$2"
|
zzcopy "$TMPLIST" "$2"
|
||||||
rm -f "$TMPLIST"
|
rm -f "$TMPLIST"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ dl()
|
|||||||
echo list is too small : $dlsize bytes. can be bad.
|
echo list is too small : $dlsize bytes. can be bad.
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
zzcat "$TMPLIST" | zz "$2"
|
zzcopy "$TMPLIST" "$2"
|
||||||
rm -f "$TMPLIST"
|
rm -f "$TMPLIST"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ dl()
|
|||||||
echo list is too small : $dlsize bytes. can be bad.
|
echo list is too small : $dlsize bytes. can be bad.
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
zzcat "$TMPLIST" | zz "$2"
|
zzcopy "$TMPLIST" "$2"
|
||||||
rm -f "$TMPLIST"
|
rm -f "$TMPLIST"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ dl()
|
|||||||
echo list is too small : $dlsize bytes. can be bad.
|
echo list is too small : $dlsize bytes. can be bad.
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
zzcat "$TMPLIST" | zz "$2"
|
zzcopy "$TMPLIST" "$2"
|
||||||
rm -f "$TMPLIST"
|
rm -f "$TMPLIST"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,8 +25,7 @@ dl()
|
|||||||
echo list is too small : $dlsize bytes. can be bad.
|
echo list is too small : $dlsize bytes. can be bad.
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
# remove DOS EOL \r
|
zzcopy "$TMPLIST" "$2"
|
||||||
zzcat "$TMPLIST" | zz "$2"
|
|
||||||
rm -f "$TMPLIST"
|
rm -f "$TMPLIST"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user