Skip to content

Commit

Permalink
Merge pull request #248 from kiwix/fix_mirrors_scan
Browse files Browse the repository at this point in the history
Mirrorbrain scan DIRS should contain only topmost folder in the hierarchy
  • Loading branch information
benoit74 authored Oct 16, 2023
2 parents 249f2ec + 906bac1 commit 3bf519e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mirrorbrain/bin/update_mirrorbrain_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3bf519e

Please sign in to comment.