On Tue, 10 Jan 2023, Petr Štetiar wrote:

Date: Tue, 10 Jan 2023 10:08:51
From: Petr Štetiar <yn...@true.cz>
To: Brian Norris <computersforpe...@gmail.com>
Cc: Christian Marangi <ansuels...@gmail.com>, Thibaut <ha...@slashdirt.org>,
    Robert Marko <robima...@gmail.com>, openwrt-devel@lists.openwrt.org,
    Jo-Philipp Wich <j...@mein.io>
Subject: Re: [PATCH v2 6/7] coreutils: Import from packages feed

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.

+1

Enrico

Cheers,

Petr

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

Reply via email to