Brian Norris <computersforpe...@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.

Cheers,

Petr

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to