Skip to content

[Code scan] Fix unmatched fi in generate_orbital_mixstru.sh #7542

Description

@njzjz

This issue is a result of a Codex global repository scan.

tools/01_NAO_generation/examples/example_opt_lcao_bash/generate_orbital_mixstru.sh does not pass shell syntax validation. bash -n fails on the empty else branch ending at line 656, so the example script cannot be executed as-is.

#if [ "${EXE_orbital##*.}" != "py" ];
if [ "${EXE_orbital:0-3:3}" != ".py" ];
then
echo ok ;
else
fi

Relevant code:

if [ "${EXE_orbital:0-3:3}" != ".py" ]; 
then 
    echo ok ; 

else 

fi

Verification command:

bash -n tools/01_NAO_generation/examples/example_opt_lcao_bash/generate_orbital_mixstru.sh

Current result:

tools/01_NAO_generation/examples/example_opt_lcao_bash/generate_orbital_mixstru.sh: line 656: syntax error near unexpected token `fi'
tools/01_NAO_generation/examples/example_opt_lcao_bash/generate_orbital_mixstru.sh: line 656: `fi'

Suggested fix:

Either remove the empty else branch or add the intended command body. If this branch is intentionally a no-op, use : so the script remains syntactically valid.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions