Skip to content

Conversation

@cD1rtX3
Copy link

@cD1rtX3 cD1rtX3 commented Dec 28, 2025

dev build for branch | USERNAME:BRANCHNAME

Added:

  • check against useless "$0",
  • export GTK_PREFIX=, and
  • shellcheck directives against warnings;

replaced printf with echo; redirected status messages to stderr; added -- safeguard for builtins when necessary; and removed exec.

Check if completed:

Added:

  * check against useless `"$0"`,
  * `export GTK_PREFIX=`, and
  * shellcheck directives against warnings;

redirected status messages to `stderr`; and removed `exec`.
@cD1rtX3
Copy link
Author

cD1rtX3 commented Dec 28, 2025

I complied with what seems to be the style guide, but that isn't the standard style guide (notably, the use of double-quotes instead of single-quotes and the quoted cases).

Copy link
Member

@YoshiRulz YoshiRulz left a comment

Choose a reason for hiding this comment

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

I'm a bit confused by this PR. Did you just throw it into a linter and apply every suggestion?

*"EmuHawkMono.sh");;
*"/bin/"*"sh")
# Very bad way to detect /path/to/shell
echo "I don't know where I am! Could you run me as \"/path/to/EmuHawkMono.sh\"?"
Copy link
Member

Choose a reason for hiding this comment

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

It should support being renamed via symlinking.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

Choose a reason for hiding this comment

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

Does this now support something like ln -s /opt/bizhawk/EmuHawkMono.sh ~/.local/bin/emuhawk?

Copy link
Author

@cD1rtX3 cD1rtX3 Dec 29, 2025

Choose a reason for hiding this comment

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

Yes. It will just think you're running it with a shell if that executable's name ends in sh, but not .sh, and it is in a folder called bin. I don't know how else to better detect a shell, since bash for some reason uses its fullly-qualified path as "$0" when a script is sourced.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, that's what this is for. I'm not sure I want to merge a hack just to detect a niche user error.

Copy link
Author

Choose a reason for hiding this comment

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

I guess that's fair. You could remove the hacky part, though you should probably keep the non-hacky part.

@YoshiRulz YoshiRulz added the Meta Relating to code organisation or to things that aren't code label Dec 28, 2025
@cD1rtX3
Copy link
Author

cD1rtX3 commented Dec 28, 2025

No, I didn't "just throw it into a linter", though I do have a linter in my IDE. I noticed some minor issues, and thought the simplest way to get them fixed was to simply open a PR.

@YoshiRulz
Copy link
Member

What's this style guide you're referring to?

@cD1rtX3
Copy link
Author

cD1rtX3 commented Dec 29, 2025

I guess there isn't a strict “standard style guide”, just “what you'll generally see code written like online/in books”, thus being what more people are used to. If you mean your style guide, it's what I inferred from how you wrote the code in that file.

@cD1rtX3
Copy link
Author

cD1rtX3 commented Dec 30, 2025

Why do we need to set $LD_LIBRARY_PATH to /usr/lib? Most apps get around just fine with it being empty, and if it's set, the system should search the default paths after the ones inside the path anyway (from my understanding). Was this catching us off-guard before?

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

Labels

Meta Relating to code organisation or to things that aren't code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants