curl -Lfs https://raw.githubusercontent.com/haampie/libtree/master/lib... | ${CC:-cc} -o libtree -x c - -std=c99 -D_FILE_OFFSET_BITS=64
curl -Lfs https://raw.githubusercontent.com/haampie/libtree/master/lib... | ${CC:-cc} -o libtree -x c - -std=c99 -D_FILE_OFFSET_BITS=64
https://github.com/haampie/libtree/releases/download/v3.1.1/...
The only verification provided is a sha256sum provided in the README, there's no way to confirm what source code or compiler was used to produce the binary, and no way to verify the binary was produced by that github user / that the README sha256 I was served was untampered with.
I would propose that the 'unsafe' curl method is in fact probably safer than the recommended-first choice in the README.
alias libtree='curl -LfSs https://raw.githubusercontent.com/haampie/libtree/master/libtree.c | ${CC:-cc} -o /tmp/libtree -x c - -std=c99 -D_FILE_OFFSET_BITS=64; /tmp/libtree'
so any time you invoke `libtree` it downloads the latest version, compiles it, and runs it.With a stable internet connection, it is still faster than pax-util's lddtree, which is written in Python.
C is an excellent scripting language.