#!/bin/bash

# $1: expsore name
# $2: destination directory (date)

pathbase=`echo "SELECT path_base FROM camProcessedExp JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE exp_name = '$1' " | mysql -h scidbm -u ipp -pipp gpc1 | grep -v path_base`

source=`neb-ls -p $pathbase.smf`

mkdir -p $2/smf
cp $source $2/smf/$1.smf

