Hoo man has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/148094

Change subject: Make use of new lines more consistent within wikidata json dumps
......................................................................

Make use of new lines more consistent within wikidata json dumps

In combination with https://gerrit.wikimedia.org/r/148084 this
makes sure that we have one entity per line and that each line
ends with a comma.

Change-Id: I0f8f59ab669f31493f3dbd10cc2b743890cd83c5
---
M modules/snapshot/files/dumpwikidatajson.sh
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/148094/1

diff --git a/modules/snapshot/files/dumpwikidatajson.sh 
b/modules/snapshot/files/dumpwikidatajson.sh
index dee9151..48a788d 100644
--- a/modules/snapshot/files/dumpwikidatajson.sh
+++ b/modules/snapshot/files/dumpwikidatajson.sh
@@ -35,11 +35,11 @@
        let i++
        if [ $i -lt $shards ]; then
                # Shards don't end with commas so add commas to separate them
-               echo -n ',' | gzip -f >> $targetFile
+               echo ',' | gzip -f >> $targetFile
        fi
 done
 
-echo ']' | gzip -f >> $targetFile
+echo -e '\n]' | gzip -f >> $targetFile
 
 # Remove dumps we no longer need (keep 10)
 filesToDelete=`ls -r $targetDir/20*.gz | tail -n +11`

-- 
To view, visit https://gerrit.wikimedia.org/r/148094
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f8f59ab669f31493f3dbd10cc2b743890cd83c5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hoo man <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to