Skip to content

Commit

Permalink
response yes to mop prompt question
Browse files Browse the repository at this point in the history
  • Loading branch information
yueyaog committed May 20, 2024
1 parent 739353e commit 33372ce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions TAG_Mop/TAG_Mop.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ workflow TAG_Mop{
File deleted_sys_files = rmSysfiles.sys_files_to_delete
Int? num_mopped_files = mop.num_of_files_to_mop
File? mopped_files = mop.mopped_files
String? total_size_to_mop = mop.total_size_to_mop
}
meta {
Expand Down Expand Up @@ -115,17 +116,19 @@ workflow TAG_Mop{
# Dry run Mop
fissfc mop -w ~{workspaceName} -p ~{namespace} --dry-run > mop_dry_run.txt
echo Files to mop:" $(cat mop_dry_run.txt | wc -l)"
cat mop_dry_run.txt | wc -l > num_of_files_to_mop.txt
cat mop_dry_run.txt | grep "gs:" | wc -l > num_of_files_to_mop.txt
cat mop_dry_run.txt | grep Total | awk '{print $3 $4}' > total_size_to_mop.txt
# Mop
if [ $(cat mop_dry_run.txt | wc -l) -eq 0 ]; then
echo "No files to mop"
else
fissfc mop --yes -w ~{workspaceName} -p ~{namespace}
fissfc --yes mop -w ~{workspaceName} -p ~{namespace}
fi
>>>
output{
Int num_of_files_to_mop = read_int("num_of_files_to_mop.txt")
String total_size_to_mop = read_string("total_size_to_mop.txt")
File mopped_files = "mop_dry_run.txt"
}
runtime {
Expand Down

0 comments on commit 33372ce

Please sign in to comment.