From 4f6f2ee453b338a7a225ab9237022cb01517593e Mon Sep 17 00:00:00 2001 From: Alex Austregesilo Date: Tue, 21 Nov 2023 16:23:32 -0500 Subject: [PATCH] if the input file is a tar ball, extract locally --- launch_scripts/launch/script.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/launch_scripts/launch/script.sh b/launch_scripts/launch/script.sh index 709b048..4cedaae 100755 --- a/launch_scripts/launch/script.sh +++ b/launch_scripts/launch/script.sh @@ -43,6 +43,15 @@ Setup_Script() echo "JANA_CALIB_URL: " $JANA_CALIB_URL fi + if [[ $INPUTFILE == *"tar" ]] ; then + # extract and flatten directories + tar xvf $INPUTFILE --transform='s/.*\///' + rm $INPUTFILE + # update input files + export INPUTFILE=${INPUTFILE/.hddm.tar/_*.hddm} + echo INPUTFILE = $INPUTFILE + fi + # LIST WORKING DIRECTORY echo "LOCAL FILES" ls -l