Index: trunk/wikistats/dumps/zip_csv.sh |
— | — | @@ -1,12 +1,20 @@ |
2 | | -#!/bin/sh |
| 2 | +#!/bin/bash |
3 | 3 | |
4 | | -cd /a/wikistats/ |
5 | | -rm zip_all/csv_$1.zip |
6 | | -rm zip_all/bz2_$1.zip |
7 | | -cd csv_$1 |
8 | | -rm csv*.zip |
9 | | -zip csv_$1.zip *.csv |
10 | | -zip bz2_$1.zip *.bz2 |
11 | | -cp csv_$1.zip ../zip_all |
12 | | -cp bz2_$1.zip ../zip_all |
13 | | -cd .. |
| 4 | +if [ "$1" == "" ] ; then |
| 5 | + echo "Project code missing! Specify as 1st argument one of wb,wk,wn,wp,wq,ws,wv,wx" |
| 6 | + exit |
| 7 | +fi |
| 8 | + |
| 9 | +cd /a/wikistats/csv_$1 |
| 10 | + |
| 11 | +echo "rebuild /a/wikistats/zip_all/csv_$1.zip" |
| 12 | +rm /a/wikistats/zip_all/csv_$1.zip |
| 13 | +zip -q /a/wikistats/zip_all/csv_$1.zip *.csv |
| 14 | + |
| 15 | +echo "rebuild /a/wikistats/zip_all/bz2_$1.zip" |
| 16 | +rm /a/wikistats/zip_all/bz2_$1.zip |
| 17 | +zip -q /a/wikistats/zip_all/bz2_$1.zip *.bz2 |
| 18 | + |
| 19 | +echo "" |
| 20 | +echo "rsync -avv /a/wikistats/zip_all/csv_*.zip /mnt/dumps/xmldatadumps/public/other/pagecounts-ez/wikistats" |
| 21 | +rsync -avv /a/wikistats/zip_all/csv_*.zip /mnt/dumps/xmldatadumps/public/other/pagecounts-ez/wikistats |