Skip to content

chore(public/sendme.sh): POSIX compliance and verbosity #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yermulnik
Copy link

  • Make if-conditional POSIX compliant to allow for /bin/sh that is not Bash
  • Wrap cmdline params to prevent globbing and word splitting
  • Add verbosity to tar to allow user to see where the binary is unpacked to

Copy link

vercel bot commented Apr 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
iroh-computer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 10:25pm

* Make `if`-conditional POSIX compliant to allow for `/bin/sh` that is not Bash
* Wrap cmdline params to prevent globbing and word splitting
* Add verbosity to `tar` to allow user to see where the binary is unpacked to
Copy link
Contributor

@neuralpain neuralpain left a comment

Choose a reason for hiding this comment

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

Should sed -E be used instead of sed -r for POSIX portability, as mentioned in the sed docs?

  -E, -r, --regexp-extended
                 use extended regular expressions in the script
                 (for portability use POSIX -E).

@yermulnik
Copy link
Author

yermulnik commented Apr 12, 2025

Should sed -E be used instead of sed -r for POSIX portability, as mentioned in the sed docs?

  -E, -r, --regexp-extended
                 use extended regular expressions in the script
                 (for portability use POSIX -E).

On FreeBSD, where sed is POSIX.2 compliant, I can see that it supports -r flag:

     -r      Same as -E for compatibility with GNU sed.

So it should be fine I guess.

UPD: let me know and I can update sed to use -E though.

@neuralpain
Copy link
Contributor

On FreeBSD, where sed is POSIX.2 compliant, I can see that it supports -r flag:

Okay, then there shouldn't be any issues. The current changes are good.

@flub flub requested a review from Arqu April 14, 2025 11:12
@yermulnik
Copy link
Author

yermulnik commented Apr 18, 2025

@neuralpain Can you please dismiss your changes request?
@Arqu Can you please give this PR a review/approval?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

3 participants