Skip to content

Command line utility lacks update command #317

Closed
@navid-zamani

Description

@navid-zamani

Right now, when I want to patch a single file in an archive, I have to unpack the entire archive, patch the file, and then pack it again. This takes an unreasonable amount of time.

Most tools have an update command, to allows one to save all but the necessary work. E.g. ar already has this, as do tar (with compression too) and zip.

It would be nice, if asar had this too, if it is easy to implement and not a lot of work, and if it doesn’t extract the archive internally anyway and saves time/resources.

Here’s my use case, which changes the key mapping in Signal Desktop’s asar file:

npx asar extract "$asar" "$tmp"
sed -ri 's/key:( *)13,/key:\113,\1ctrlKey:\1true,/g' \
    "$tmp/ts/components/CompositionInput.js" \
    "$tmp/preload.bundle.js"
sed -ri 's/\*in//g' \
    "$tmp/_locales/de/messages.json"
npx asar pack "$tmp" "$geheilt"
rm -rf "$tmp"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions