manga-cli icon indicating copy to clipboard operation
manga-cli copied to clipboard

Use posix compliant sed/ls commands

Open zotlann opened this issue 2 years ago • 0 comments

I was trying this out on my M1 macbook air without GNU coreutils installed and ran into a couple issues that are pretty easily fixed.

sed -n behaves identically to sed --silent and should work on BSD/macos versions of sed as well. ls | sort -V behaves similarly to ls -v and outputs in a format that img2pdf accepts, and should also work for BSD/macos versions of ls.

Everything else worked out of the box.

I don't have any machines running BSD so I can't tell if this will work out of the box there, but it works on my mac.

I think it's reasonable to just say that gnu coreutils is a dependency, go install and use those, but it was simple enough to get this working without them without effecting performance. It may make things a little bit easier for people on mac/bsd, so I figured I'd put together a PR.

zotlann avatar Jun 23 '22 05:06 zotlann