ipfs / notes

IPFS Collaborative Notebook for Research
MIT License
402 stars 31 forks source link

Creating an install script tool #77

Open RichardLitt opened 8 years ago

RichardLitt commented 8 years ago

@jbenet, about setup-commit-msg-hook.sh, in this comment:

we should have like a ipfs-bin install <tool> (or gx-bin) that installs things like this script

Thoughts?

fazo96 commented 8 years ago

We could hack a tool that acts as a manager for executable files and uses ipfs as storage.

When running something, the tool would execute ipfs cat programs_folder_hash/program_name | sh which wouldn't be that bad security-wise since the executable was "installed" by the user in the first place. Shebang can be used to allow python, node etc scripts.

The tool would remember the hash of the folder containing all of the executables of the user, editing said folder and updating the reference when something is added or removed.

Of course it's really only useful for small, single file programs and scripts.

I should have the free time to make a simple prototype if there's some interest :+1:

jbenet commented 8 years ago

@fazo96 :) yep, i've been doing this. check this out:

need a fuse interface ;)


but ideally, what i want is closer to a package manager. some of these programs -- say go programs --will be compiled, not interpreted. so want:

> ipm install /ipfs/QmNpd6D2Dk5US2ZMqn15DazMAY7Ru59XNraz9dC1shfNV5/ipfs-update
ipget /ipfs/QmNpd6D2Dk5US2ZMqn15DazMAY7Ru59XNraz9dC1shfNV5/ipfs-update/darwin-amd64
ln -s /ipfs/QmNpd6D2Dk5US2ZMqn15DazMAY7Ru59XNraz9dC1shfNV5/ipfs-update/darwin-amd64/bin/ipfs-update /usr/bin/ipfs-update

> ipfs-update
[... running ipfs-update ...]

or even

> ipm install ipfs-update
resolving ipfs-update@latest
found /ipfs/QmNpd6D2Dk5US2ZMqn15DazMAY7Ru59XNraz9dC1shfNV5/ipfs-update/latest
ipget /ipfs/QmNpd6D2Dk5US2ZMqn15DazMAY7Ru59XNraz9dC1shfNV5/ipfs-update/latest/darwin-amd64
ln -s /ipfs/QmNpd6D2Dk5US2ZMqn15DazMAY7Ru59XNraz9dC1shfNV5/ipfs-update/latest/darwin-amd64/bin/ipfs-update /usr/bin/ipfs-update

> ipfs-update
[... running ipfs-update ...]

where ipm == ipfs-bin == gx-bin