From edc05a653682f739f61b37a15c19d2e6df00170f Mon Sep 17 00:00:00 2001
From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu>
Date: Thu, 7 Jan 2021 14:21:54 -0600
Subject: [PATCH] Change error conditional in bdbag fetch to use file

---
 workflow/scripts/bdbag_fetch.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/workflow/scripts/bdbag_fetch.sh b/workflow/scripts/bdbag_fetch.sh
index c546d6f..c34dc75 100644
--- a/workflow/scripts/bdbag_fetch.sh
+++ b/workflow/scripts/bdbag_fetch.sh
@@ -3,7 +3,7 @@
 bdbag --materialize ${1} --debug
 validate=""
 bdbag --validate full ${1} 2> validate.txt
-validate=$(tail -n validate.txt | grep -o 'is valid')
+validate=$(tail -n1 validate.txt | grep -o 'is valid')
 if [ "${validate}" != "is valid" ]
 then
     n=0
-- 
GitLab