From 906bac15702725f540ce355a93d6f217ba3bfb17 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Mon, 16 Oct 2023 12:46:16 +0200 Subject: [PATCH] DIRS should contain only topmost folder in the hierarchy --- mirrorbrain/bin/update_mirrorbrain_db.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mirrorbrain/bin/update_mirrorbrain_db.sh b/mirrorbrain/bin/update_mirrorbrain_db.sh index d9274e18..f5c5c1dc 100644 --- a/mirrorbrain/bin/update_mirrorbrain_db.sh +++ b/mirrorbrain/bin/update_mirrorbrain_db.sh @@ -5,9 +5,9 @@ echo "Setting up variables..." MB=/usr/local/bin/mb REPO="/var/www/download.kiwix.org/" ESCREPO=`echo "$REPO" | sed -e 's/[\\/&]/\\\\&/g'` -ALLDIRS=`find "$REPO" -type d | sed "s/$ESCREPO//"` -WMDIRS=`find "$REPO" -type d -name "*wikinews*" -o -type d -name "*wikipedia*" -o -type d -name "*wiktionary*" -o -type d -name "*wikisource*" -o -type d -name "*wikibooks*" -o -type d -name "*wikivoyage*" -o -type d -name "*wikiquote*" -o -type d -name "*wikinews*" -o -type d -name "*wikiversity*" -o -type d -name "*0.9*" | sed "s/$ESCREPO//" | grep -v -e "^archive/"` -ZIMDIRS=`find "$REPO" -type d | grep "${REPO}zim"| sed "s/$ESCREPO//" | grep -v -e "^archive/"` +ALLDIRS=`find "$REPO" -maxdepth 1 -type d | sed "s/$ESCREPO//"` +WMDIRS=`find "$REPO" -type d -name "*wikinews*" -o -type d -name "*wikipedia*" -o -type d -name "*wiktionary*" -o -type d -name "*wikisource*" -o -type d -name "*wikibooks*" -o -type d -name "*wikivoyage*" -o -type d -name "*wikiquote*" -o -type d -name "*wikinews*" -o -type d -name "*wikiversity*" -o -type d -name "*0.9*" | sed "s/$ESCREPO//" +ZIMDIRS="zim" function scanMirror() { MIRROR=$1