Skip to content

Commit

Permalink
Merge pull request #811 from JohannesKersting/update_daisybio
Browse files Browse the repository at this point in the history
update daisybio profile: use group of the launch directory for work directory
  • Loading branch information
JohannesKersting authored Dec 4, 2024
2 parents ddde96e + 6146fde commit 304c9e4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion conf/daisybio.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@ params {
// define workDir in /nfs/scratch/nf-core_work/ named after the launch dir
def work_dir = "/nfs/scratch/nf-core_work/"
if(new File(work_dir).exists() && System.getenv("PWD")) {
workDir = work_dir+System.getenv("PWD").tokenize('/').join('.')
work_dir = work_dir+System.getenv("PWD").tokenize('/').join('.')
workDir = work_dir

// if directory does not exist, create it and set the group to the group launch dir
if(!new File(work_dir).exists()) {
"mkdir -p ${work_dir}".execute()
def pwd = System.getenv("PWD")
def group = "stat -c %g ${pwd}".execute().text.trim()
"chgrp -R ${group} ${work_dir}".execute()
"chmod -R g+s ${work_dir}".execute()
}
}

process {
Expand Down

0 comments on commit 304c9e4

Please sign in to comment.