From 1f5bb620cbb7768762c16914775fa7412b431c5b Mon Sep 17 00:00:00 2001 From: pgueth Date: Fri, 4 Mar 2011 12:51:34 +0100 Subject: [PATCH] check if file already exists --- grid/common.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/grid/common.sh b/grid/common.sh index 44ad693..c466050 100644 --- a/grid/common.sh +++ b/grid/common.sh @@ -27,6 +27,12 @@ test "${answer}" == "n" && return 1 check_user "${prompt}" } +function file_exists { +lfnfile="${1:?"provide lfn to file"}" +lfc-ls ${lfnfile} 2>&1 > /dev/null +} + + # common path used lfnbase="/grid/biomed/creatis/fgate/" lfnrelease="${lfnbase}releases/" -- 2.47.1