pcm-bw-histogram.sh: expect pcm-memory to reside in same folder, rather than ./#961
Merged
rdementi merged 1 commit intointel:masterfrom Jun 25, 2025
Merged
pcm-bw-histogram.sh: expect pcm-memory to reside in same folder, rather than ./#961rdementi merged 1 commit intointel:masterfrom
pcm-memory to reside in same folder, rather than ./#961rdementi merged 1 commit intointel:masterfrom
Conversation
rdementi
requested changes
Jun 25, 2025
Contributor
rdementi
left a comment
There was a problem hiding this comment.
suggestions from copilot make sense. Please implement them.
…ther than ./ As pcm-bw-histogram.sh is installed (renamed to pcm-bw-histogram) alongside the pcm-memory binary in sbin/, `pcm-memory` should be found in the same folder as the script, rather than the current folder. Without this patch, pcm-bw-histogram cannot be launched (as it cannot find ./pcm-memory), unless you cd to the sbin/ folder. This is inconvenient, as the script creates a temporary file, as well as an output .csv file, in the current folder. With this patch, you can just launch pcm-bw-histogram from any folder, and it will find pcm-memory in the same folder where it's been installed.
Contributor
Author
|
done, in updated (forced) commit 9f82188 in my forked master, thanks! |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the pcm-bw-histogram script to ensure it finds the pcm-memory binary in the same folder as the script, rather than relying on the current working directory.
- Introduces the mydir variable to hold the script's directory.
- Updates all pcm-memory invocations to use "$mydir/pcm-memory".
Comments suppressed due to low confidence (1)
src/pcm-bw-histogram.sh:14
- [nitpick] Consider renaming 'mydir' to 'script_dir' to improve readability and better convey its purpose.
mydir=$(dirname "$0")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As pcm-bw-histogram.sh is installed (renamed to pcm-bw-histogram) alongside the pcm-memory binary in sbin/,
pcm-memoryshould be found in the same folder as the script, rather than the current folder. Without this patch, pcm-bw-histogram cannot be launched (as it cannot find ./pcm-memory), unless you cd to the sbin/ folder. This is inconvenient, as the script creates a temporary file, as well as an output .csv file, in the current folder. With this patch, you can just launch pcm-bw-histogram from any folder, and it will find pcm-memory in the same folder where it's been installed.