]> Sergey Matveev's repositories - feeder.git/blob - cmd/parse.sh
3af3258892c8bb09d2b430aa727b3d66c5a29c3a
[feeder.git] / cmd / parse.sh
1 #!/bin/sh -e
2
3 cmds="$(dirname "$(realpath "$0")")"
4 cd "$1"
5 [ -s parse.hash ] && hash_our=`cat parse.hash` || :
6 [ -s download.hash ] && hash_their=`cat download.hash` || :
7 [ "$hash_our" != "$hash_their" ] || exit 0
8 [ -s max ] && max=`cat max` || max=${FEEDER_MAX_ITEMS:-100}
9 zstd -d < feed.zst | $cmds/feed2mdir/feed2mdir -max-entries $max . > title.tmp
10 mv title.tmp title
11 echo $hash_their > parse.hash