Skip to content

Replace hardcoded Kindle-specific paths with variables#16

Merged
justrals merged 4 commits intojustrals:mainfrom
shamanNS:replace_hardcoded_paths
Jul 22, 2025
Merged

Replace hardcoded Kindle-specific paths with variables#16
justrals merged 4 commits intojustrals:mainfrom
shamanNS:replace_hardcoded_paths

Conversation

@shamanNS
Copy link
Contributor

This PR basically just replaces usage of hardcoded /mnt/us and /tmp strings in file and directory paths (used by scripts in bin/ directory) with BASE_DIR and TMP_DIR variables.

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.

@justrals justrals merged commit accadc3 into justrals:main Jul 22, 2025
@shamanNS shamanNS deleted the replace_hardcoded_paths branch July 28, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants