#!/bin/bash if [ -z "$2" ]; then echo "Usage: $0 " fi lang=$1 edition=$2 dest=/mnt/static/downloads/$edition/$lang sitebase=/mnt/static/wikipedia bindir=/mnt/static/scripts cd $dest rm html.lst.* split -a1 -d -l1000000 html.lst html.lst. cd $sitebase for f in $dest/html.lst.* ; do vol=${f#$dest/html.lst.} if [ $vol == 0 ];then response_files="@$f @$dest/skins.lst" else response_files="@$f" fi $bindir/7za-readdir-hack -l -ms8m a $dest/wikipedia-$lang-html.$vol.7z $response_files done