#!/bin/bash

if [ "$#" -eq 1 ] ; then
	day="$1"
	tar -czf DAS348_D01_$day.tar.gz ../348/mic0/DAS348_D01_$day*
	tar -czf DAS421_D01_$day.tar.gz ../421/mic0/DAS421_D01_$day*
	tar -czf DAS423_D01_$day.tar.gz ../423/mic0/DAS423_D01_$day*
	tar -czf DAS423_D02_$day.tar.gz ../423/mic1/DAS423_D02_$day*
	tar -czf DAS424_D01_$day.tar.gz ../424/mic0/DAS424_D01_$day*
	tar -czf DAS425_D01_$day.tar.gz ../425/mic0/DAS425_D01_$day*
	tar -czf BOX5001_D01_$day.tar.gz ../5001/mic0/BOX5001_D01_$day*
	tar -czf BOX5002_D01_$day.tar.gz ../5002/mic0/BOX5002_D01_$day*
	tar -czf BOX5004_D01_$day.tar.gz ../5004/mic0/BOX5004_D01_$day*
	tar -czf BOX5005_D01_$day.tar.gz ../5005/mic0/BOX5005_D01_$day*
	tar -czf BOX5006_D01_$day.tar.gz ../5006/mic0/BOX5006_D01_$day*

else
	echo "Usage:"
	echo "daily_sync.sh [DATE]"
	echo ""
	echo "DATE is YYYYMMDD"
fi

