Skip to content

Review tools using bash variables (in particular with cp/mv) #7520

@bernt-matthias

Description

@bernt-matthias

Here cp -r "/" augustus_dir/ will be executed if AUGUSTUS_CONFIG_PATH is not defined. This should happen only if the requirement is not installed, but then we still do not want to copy / :)

We should at least remove the trailing / from $AUGUSTUS_CONFIG_PATH/ and/or add something like

if [ -z "\$AUGUSTUS_CONFIG_PATH" ]; then
    >&2 echo "AUGUSTUS_CONFIG_PATH not set"; 
    exit 1
fi

More candidates for problematic tools: egrep "\\\\\\$" tools/ -r --include "*xml" | grep -v GALAXY | egrep "cp|mv"

I would love to see shellcheck tool_script.sh invoked before tool tests...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions