Commit 0539da38 authored by Juve, Gideon's avatar Juve, Gideon
Browse files

Add archiving script to generate output files

parent 7ccf886f
#!/bin/bash
set -e
function usage () {
echo "Usage: $0 -stage N"
}
if [ $# -eq 0 ]; then
usage
exit 1
fi
while [ $# -ne 0 ]; do
case "$1" in
-stage)
STAGE=$1
;;
*)
usage
exit 1
;;
esac
shift
done
if [ -z "$STAGE" ]; then
echo "ERROR: Specify -stage"
usage
exit 1
fi
if ! [ -z "$PBS_O_WORKDIR" ]; then
cd $PBS_O_WORKDIR
fi
CASE=$(./xmlquery CASE -valonly -silent)
RUNDIR=$(./xmlquery RUNDIR -valonly -silent)
RUNDIR=$(cd $RUNDIR && pwd)
tar -cz -f ${CASE}.stage${STAGE}.tar.gz -C $RUNDIR ${CASE}.*
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment