Created
January 8, 2024 16:41
-
-
Save clintval/55ee8d6ddb3b70c8dab175b8aa3c69ba to your computer and use it in GitHub Desktop.
Compile Nextflow library groovy code linked against Nextflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Attempts to compile the groovy present in nextflow/lib/ with the groovy compiler and nextflow | |
# libararies properly linked (because they dont live in a place groovy can find them by default.) | |
# | |
# Must have a conda env with nextflow and groovy installed in order for this script to work. | |
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | |
NEXTFLOW_CLASSPATH_STRING="." | |
while IFS= read -r -d '' jar | |
do | |
NEXTFLOW_CLASSPATH_STRING="$NEXTFLOW_CLASSPATH_STRING:$jar" | |
done < <(find ${CONDA_PREFIX}/share/nextflow -name '*.jar' -print0) | |
export NEXTFLOW_CLASSPATH_STRING | |
mkdir -p "${SCRIPT_DIR}/classes/" | |
groovyc \ | |
--classpath "${NEXTFLOW_CLASSPATH_STRING}" \ | |
-d "${SCRIPT_DIR}/classes/" \ | |
"${SCRIPT_DIR}/../nextflow/lib/"*.groovy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment