Skip to content

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

Closed
yermulnik wants to merge 1 commit inton0-computer:mainfrom
yermulnik:main
Closed

chore(public/sendme.sh): POSIX compliance and verbosity#318
yermulnik wants to merge 1 commit inton0-computer:mainfrom
yermulnik:main

Conversation

@yermulnik
Copy link
Copy Markdown
Contributor

  • 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

@vercel
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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.

@neuralpain
Copy link
Copy Markdown
Contributor

neuralpain commented Jun 7, 2025

@Arqu Can we get an approval for this?

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Mar 24, 2026
@yermulnik
Copy link
Copy Markdown
Contributor Author

😕

@Arqu
Copy link
Copy Markdown
Contributor

Arqu commented Mar 25, 2026

WTF how did I miss this so long. PR lgtm. Care to reopen and reference this one. I'll approve.

@Arqu
Copy link
Copy Markdown
Contributor

Arqu commented Mar 25, 2026

@yermulnik sorry this has completely slipped besides me....

@yermulnik
Copy link
Copy Markdown
Contributor Author

@Arqu No worries. Technically the only missing bit from current script implementation is this:
image

  • Wrap cmdline params to prevent globbing and word splitting
  • Add verbosity to tar to allow user to see where the binary is unpacked to

Would you like me to create a new PR to suggest this change?

@Arqu
Copy link
Copy Markdown
Contributor

Arqu commented Mar 25, 2026

Appreciate the patience! Yes, ideally I'd like you to be credited with the PR given you did all the work too :)

@yermulnik
Copy link
Copy Markdown
Contributor Author

Here it is: #444

Arqu pushed a commit that referenced this pull request Mar 25, 2026
)

* chore(public/sendme.sh): Wrap vars and add verbosity

Related to #318

* Wrap cmdline params to prevent globbing and word splitting
* Add verbosity to `tar` to allow user to see where the binary is unpacked to

* Address GH Copilot suggestions and add a bit more verbosity

* Make `grep`'ing more robust, fail if no release, add verbosity to `unzip`

* Add more details when release is not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

5 participants