Skip to content

Commit

Permalink
Fix uploads recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
stevekm committed Apr 29, 2019
1 parent 60388d3 commit b57d93b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -318,20 +318,20 @@ endif
check-output:
@if [ ! -d "$(outputDir)" ]; then echo ">>> ERROR: outputDir does not exist: $(outputDir)"; exit 1; fi

uploads:
uploads: uploadsPath:=$(UPLOADSDIR)/$(RUNID)/$(uploadsDir)
uploads: RUNID=$(shell python -c 'import json; print( json.load(open("$(CONFIG_OUTPUT)")).get("runID", "") )')
uploads: CONFIG_INPUT:=config.json
uploads: check-output check-passed check-runID $(PASSED0)
mkdir -p "$(uploadsPath)" && \
RUNID="$$(python -c 'import json; print( json.load(open("$(CONFIG_OUTPUT)")).get("runID", "None") )')"
CONFIG_OUTPUT="$(UPLOADSDIR)/$${RUNID}/config.json" && \
cp "$(CONFIG_INPUT)" "$${CONFIG_OUTPUT}" && \
$(MAKE) uploads-recurse FindPassed0Fastq=1 uploadsPath="$(uploadsPath)" CONFIG_OUTPUT="$${CONFIG_OUTPUT}"
uploads-recurse: $(Passed0Fastqs) $(CONFIG_OUTPUT)
uploads: check-output check-passed $(PASSED0)
$(MAKE) check-runID RUNID="$(RUNID)" && \
uploadsPath="$(UPLOADSDIR)/$(RUNID)/uploads" && \
mkdir -p "$${uploadsPath}" && \
$(MAKE) uploads-recurse FindPassed0Fastq=1 uploadsPath="$${uploadsPath}"

uploads-recurse: $(Passed0Fastqs)
$(Passed0Fastqs):
@newfile="$$(basename $@ | sed -e 's|\(_S[0-9]*\)\(_R[12]_001.fastq.gz\)$$|\2|')" ; \
newpath="$(uploadsPath)/$${newfile}" ; \
cp -via "$@" "$${newpath}"
newfile="$$(basename $@ | sed -e 's|\(_S[0-9]*\)\(_R[12]_001.fastq.gz\)$$|\2|')" && \
newpath="$(uploadsPath)/$${newfile}" && \
rsync -vrthP "$@" "$${newpath}"
# cp -via "$@" "$${newpath}"
.PHONY: $(Passed0Fastqs)

# ~~~~~ DEPLOY NGS580 ~~~~~ #
Expand Down

0 comments on commit b57d93b

Please sign in to comment.