Replace hardcoded Kindle-specific paths with variables#16
Merged
justrals merged 4 commits intojustrals:mainfrom Jul 22, 2025
shamanNS:replace_hardcoded_paths
Merged
Replace hardcoded Kindle-specific paths with variables#16justrals merged 4 commits intojustrals:mainfrom shamanNS:replace_hardcoded_paths
justrals merged 4 commits intojustrals:mainfrom
shamanNS:replace_hardcoded_paths
Conversation
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.
This PR basically just replaces usage of hardcoded
/mnt/usand/tmpstrings in file and directory paths (used by scripts inbin/directory) withBASE_DIRandTMP_DIRvariables.Motivation for this changes:
By centralizing those values for 2 main needed directories (that act as base for various file paths in multiple scripts ) into variables defined at the top of the main script (
bin/kindlefetch.sh) the job of making KindleFetch scripts run on other Linux environments besides Kindle OS is much esier. Users can simply remove or comment-out the IF block that checks if the script is running on a Kindle + change the 2 variables to set temp dir (chosen temp dir need to be created manually by the user :D ) and base dir for storing downloads.Since there aren't any Kindle-only dependencies being use by this script / project (just curl, awk and sed :D ) this should be perfectly usable on many other non-Kindle devices and computers.
How was this tested:
Tested on Kindle PW5 (both running from KUAL and manually via SSH) and tested on Android phone with Termux app.