extract-memecount.sh: handle creation of memecount.log - bitreich-memestats - Bitreich meme statistics and graphs. HTML git clone git://bitreich.org/bitreich-memestats git://hg6vgqziawt5s4dj.onion/bitreich-memestats DIR Log DIR Files DIR Refs DIR Tags DIR LICENSE --- DIR commit de4c6bca50d8e9eaf654b32c5fda4ff83b36a52a DIR parent c42bd61ec30b6ff6a4324a8c137a669f00bd6e0f HTML Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Mon, 30 Aug 2021 17:26:49 +0200 extract-memecount.sh: handle creation of memecount.log Signed-off-by: Christoph Lohmann <20h@r-36.net> Diffstat: M extract-memecount.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- DIR diff --git a/extract-memecount.sh b/extract-memecount.sh @@ -18,9 +18,13 @@ if [ ! -e "${annnadir}/${memefile}" ]; then exit 1 fi +cd "$annnadir" if [ -f "${outputfile}" ]; then lastrevision="$(tail -n 1 "${outputfile}" | cut -f 2)" revisionrange="${lastrevision}..HEAD" +else + firstrevision="$(git rev-list --max-parents=0 HEAD)" + revisionrange="${firstrevision}..HEAD" fi case "${outputfile}" in @@ -31,7 +35,6 @@ case "${outputfile}" in ;; esac -cd "$annnadir" if [ "$update_annna" = "yes" ]; then git pull >/dev/null 2>&1 fi