Skip to content
Snippets Groups Projects
Commit 668670d7 authored by Matthew K Defenderfer's avatar Matthew K Defenderfer
Browse files

simplify exit on error by setting options at the beginning of the script

parent 70cd4079
No related branches found
No related tags found
1 merge request!11Add submit pol wrapper
#!/bin/bash
set -euxo pipefail
# run an mmapply policy across the cluster via slurm
# gather info to map mmapplypolicy to runtime configuration
......@@ -35,14 +37,6 @@ echo $cmd
# run policy command
$cmd
rcode=$?
if [ $rcode -ne 0 ]
then
echo error: mmapplypoicy failed: code $rcode
exit $rcode
fi
# tag output file with run metadata
outfile=`ls -t $tmpglobal | head -1`
if [[ "$outfile" != "" ]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment