diff --git a/copy_files.sh b/copy_files.sh index 8227df3..614ea47 100644 --- a/copy_files.sh +++ b/copy_files.sh @@ -15,8 +15,12 @@ cd /mnt/beacon_data echo "Unpacking the data" tar -I zstd -xvf *.tar.zst -echo "Deleting the tar.zst" -rm *.tar.zst +if [ $? -eq 0 ]; then + echo "Deleting the tar.zst" + rm *.tar.zst +else + echo "Tar command failed. Not deleting the tar.zst file." +fi if [ -n "$DEBUG" ]; then