Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Commit

Permalink
Set +e to allow grep to fail on empty publish add
Browse files Browse the repository at this point in the history
  • Loading branch information
SamStudio8 committed Jan 5, 2022
1 parent 2b1c71a commit 1db3637
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/control/cog-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ if [ ! -f "$LINKS_OK_FLAG" ]; then
cp elan.kill.latest $ELAN_DIR/staging/summary/$1/


# Files to add
# Files to add (there may be none in the strange case where we are rerunning after a successful day - so protect the grep from failure)
set +e
grep 'consensus' elan.pass.latest > elan.pass.latest.consensus.ls
set -e
cut -f3 elan.pass.latest.consensus.ls > pass.fasta.ls
wc -l pass.fasta.ls

set +e
grep 'alignment' elan.pass.latest > elan.pass.latest.alignment.ls
set -e
cut -f3 elan.pass.latest.alignment.ls > pass.bam.ls
wc -l pass.bam.ls

Expand Down

0 comments on commit 1db3637

Please sign in to comment.