Node Packaged Masterfully

npm

Need private packages and team management tools?Check out npm Orgs. »

add-bash-attachment

0.1.1 • Public • Published

add-bash-attachment

Build Status

A Node.js utils/module be used for add attachment files into bash script.

Install

npm install add-bash-attachment --global

Usage

As command line tools:

add-bash-attachment --input raw.sh \
    --file signs.key --file sources.list \
    --output install.sh

As a Node.js module:

const { addAttachments } = require('add-bash-attachment');
addAttachments({
    inputFile: 'raw.sh',
    attachments: [{
        name: 'data.bin',
        content: fs.readFileSync('data.bin'),
    }]
}).then(newScript => {
    console.log(newScript);
}).catch(error => {
    console.error(error);
});

Principle

Prepend bash function get_bash_attachment and attachment contents as base64 string.

Author

👨‍💻 @hangxingliu (Liu Yue)

License

GPL-3.0

install

npm i add-bash-attachment

Downloadsweekly downloads

1

version

0.1.1

license

GPL-3.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability