Repository navigation
Justfile improvements - #22
Conversation
The mount path for macOS is /Volumes/ unlike linux's /run/media/$USER. Also, when transfering data on macOS to FAT32 or exFAT filesystems, extra metadata files are generated, which are useless in the context of running the deployed apps --> an extra clean up mechanism was added.
This commit provides examples and extra explanations to the aforementioned commands
| sync {{"/run/media/$USER" / pb_device}} | ||
| {{ pb_mount_root / pb_device / "applications" / target_app_name }} | ||
| # 2. Cleaning up macOS metadata files (if applicable) | ||
| {{ if os() == "macos" { "rm -f " + (pb_mount_root / pb_device / "applications" / "._") + "*" } else {"echo 'No cleanup needed'"} }} |
There was a problem hiding this comment.
yes, otherwise in the application list there are 2 apps:
._inkview-slint-demo and inkview-slint-demo
and the first one doesn't run, it simply contains some metadata
There was a problem hiding this comment.
So cp on macos is creating some _<filename>.app file?
There was a problem hiding this comment.
as explained in the commit message - yes if it is cping into FAT32 or exFAT filesystems
Correction: ._<filename>.app
There was a problem hiding this comment.
Ah I see. Apparently there exists a builtin command named dot_clean on macos which will clean these up for you. So dot_clean {{ pb_mount_root / pb_device / "applications" }} would work to clean these up, while also correctly handling the metadata macos stores in them.
There was a problem hiding this comment.
Yes, this works indeed; however, it is quite slow (on my PB device in particular, it takes up to 10-20 seconds, probably because I also have a KOreader installed and it has many subfolders). For that reason, I've decided to focus on cleaning up files that were created with the cp operation during the deployment.
There was a problem hiding this comment.
Can you see how long it takes with -f to prevent recursive traversal.
There was a problem hiding this comment.
I tried to do that, but after the first completed run, which took quite long, now it's almost instantaneous XD
Then I guess I can replace clean up with dot_clean instead.
There was a problem hiding this comment.
@simmsb could you please resolve the issue and merge it to the master if all is good with you?
|
Merged, thank you :) |
This PR adds support to deploy binaries via USB on macOS, as well as improves docs by adding examples and clarifying options.