Skip to content

Conversation

@mdqst
Copy link

@mdqst mdqst commented Sep 18, 2025

  • removed unnecessary () around go install … to avoid spawning a useless subshell.
  • rewrote the file loop to safely handle .proto files with spaces or special characters:
    for file in $(find …)find … -print0 | while IFS= read -r -d '' file.
  • updated grep "option go_package" to grep -q "option go_package" "$file" for quiet search and proper quoting.
  • added cd proto || exit 1 to stop the script if the directory doesn’t exist.
  • created the x/ directory before copying files to prevent errors: mkdir -p x.
  • narrowed down rm -rf to only remove the target subdirectory (github.com/neutron-org) instead of the whole github.com.

changes make the script safer, more robust, and prevent accidental deletion or errors when handling files with tricky names.

@pr0n00gler
Copy link
Collaborator

Resolve conflicts, please

cd ..

# move proto files to the right places
mkdir -p x
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to create the x folder, it must always be here.

mkdir -p x
cp -r github.com/neutron-org/neutron/v8/x/* x/
rm -rf github.com
rm -rf github.com/neutron-org
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command will not remove the github.com directory itself, so it doesn't make sense to narrow the command down to neutron-org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants