[PATCH v2 6/7] coreutils: Import from packages feed

Petr Štetiar ynezz at true.cz
Tue Jan 10 01:08:51 PST 2023

Brian Norris <computersforpeace at gmail.com> [2023-01-09 11:51:53]:

> For my use, it feels like a simplified form (which only needs to be a
> stdin/stdout pipeline) would be pretty easy to inline into the
> caldata/firmware-loader script:
>   ucode -e 'import { stdin } from "fs"; print(b64dec(stdin.read("all")));'

from my past experience, such oneliners usually endup in a hard to maintain
copy&pasta mess between targets/scripts, thus my initial idea was to simply
ship it for the start as target/linux/ipq806x/base-files/usr/bin/b64decode.uc,
thus allowing following usage:

 - base64 -d "$source" > "$target_dir/data"
 + b64decode.uc "$source" > "$target_dir/data"

Once such decoding is needed in other parts/targets, we would simply just move
the script into target/linux/generic/base-files/usr/bin/b64decode.uc and call
it a day.



More information about the openwrt-devel mailing list