#!/bin/tcsh -f set savedir=$PWD set tmpdir=$PWD/2011.09.13.bcal_timing if ( -e $tmpdir ) then echo "Moving old directory $tmpdir into junk" rm -rf junk mv $tmpdir junk endif mkdir -p $tmpdir echo "Copying files into $tmpdir ..." foreach a (*degrees) cd $a mkdir $tmpdir/$a echo "Copying from $a ..." cp *.pdf *.png $tmpdir/$a foreach s (LAYERS*) cd $s mkdir $tmpdir/$a/$s echo "Copying from $a/$s ..." cp *.pdf *.png $tmpdir/$a/$s cd ../ end cd ../ end cd $savedir echo "Making tarball ..." tar czf 2011.09.13.bcal_timing.tgz 2011.09.13.bcal_timing rm -rf junk/2011.09.13.bcal_timing mv $tmpdir $savedir/junk echo "Done."