All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbndpoms_ifdh_mkdir-p.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 #This function makes the equivalent functionality of mkdir -p with ifdh.
4 #This is shamelessly stolen from redmine: https://cdcvs.fnal.gov/redmine/projects/ifdhc/wiki/What_about_mkdir_-p
5 
7  local dir=$1
8  local force=$2
9  echo "$0: Creating $dir with forced protocol: $force"
10 
11  if [ `ifdh ls $dir 0 $force | wc -l` -gt 0 ]
12  then
13  : # we're done
14  else
15  ifdh_mkdir_p `dirname $dir` $force
16  ifdh mkdir $dir $force
17  fi
18 }
19 
20 ifdh_mkdir_p $1 $2
then echo Invalid dCache scratch not copying back else ifdh ls
Definition: run_job.sh:111
then local
tuple dir
Definition: dropbox.py:28
ifdh_mkdir_p()