diff options
author | Thomas White <taw@physics.org> | 2012-03-06 16:15:29 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-03-06 16:16:30 +0100 |
commit | 8a314b6b40b20bb0d908df0f1af8e2f6292c1b0f (patch) | |
tree | 980df632e982bb73b32797458b33465982225e0f | |
parent | ed7337aae441e400e3bafd8c76300fc8a55cf535 (diff) |
scripts/gen-sfs: better error handling
-rwxr-xr-x | scripts/gen-sfs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/gen-sfs b/scripts/gen-sfs index 619ac08f..7dec7ee7 100755 --- a/scripts/gen-sfs +++ b/scripts/gen-sfs @@ -27,7 +27,10 @@ FORM NGAUSS 5 SYMM $SYMM END EOF -if [ $? -ne 0 ]; then exit 1; fi +if [ $? -ne 0 ]; then + echo "Failed! Please examine gen-sfs.html for more information." + exit 1 +fi echo "Running cad to get the right asymmetric unit..." cad HKLIN1 ${PDB}.mtz HKLOUT ${PDB}-sorted.mtz >> gen-sfs.html <<EOF @@ -35,15 +38,23 @@ TITLE Sorted blah LABIN FILE 1 E1=FC E2=PHIC CTYPE FILE 1 E1=F E2=P EOF -if [ $? -ne 0 ]; then exit 1; fi +if [ $? -ne 0 ]; then + echo "Failed! Please examine gen-sfs.html for more information." + exit 1 +fi echo "Converting structure factors to text..." mtz2various hklin ${PDB}-sorted.mtz hklout ${PDB}-temp.hkl >> gen-sfs.html <<EOF LABIN H=H K=K L=L FC=FC PHIC=PHIC OUTPUT USER '(3I4,2F9.1)' EOF -if [ $? -ne 0 ]; then exit 1; fi +if [ $? -ne 0 ]; then then + echo "Failed! Please examine gen-sfs.html for more information." + exit 1 +fi + rm -f ${PDB}.mtz + perl < ${PDB}-temp.hkl > ${PDB}.hkl << WIBBLE use strict; |