I have a machine with Suse Linux that I do not have root access and do not have a working package manger. I have a way to copy files to the machine. Is there a way to get shellcheck on this machine? perhaps through a precompiled binary?
Once compiled, shellcheck does not depend on any Haskell libraries, just regular GNU/Linux system libraries. It will most likely run just fine when copied, since the dependencies are likely to be there already.
If you don't want any dependencies at all, you can first build shellcheck as normal, and then link it statically with ghc -optl-static -optl-pthread -idist/build/autogen --make shellcheck . This will run on any Linux distro of the same arch.
I would recommend doing that yourself, but if you'd rather just trust binaries from strangers on the internet, I also linked a static x86_64 version just now: https://www.vidarholen.net/~vidar/shellcheck.5efb724a.gz (4MB, sha256 = 733f2f8104d12d0e8b7f5e2ee5a1c0e21d4817535cb1b8a29c9f764e26baf2a7)
Can you please consider publishing static binaries with each release? For example, the ripgrep project does that.
I do not know Haskell, and also no one uses that at work. So cannot have cabal installed via the SysAdmin.
PS: Your above linked binary works great for me on RHEL 6.6. I wish you would publish these with each release. Thanks!
@kaushalmodi There's already a pre-compiled Docker version on https://hub.docker.com/r/koalaman/shellcheck/ . Would that work?
@koalaman Sorry we don't have docker installed at work. But that binary you posted works for now. May be post such binaries with each major version release?
Statically compiled binaries are now automatically built on each new commit. There's a link to them in the readme!
@koalaman Thank you!
@koalaman I see in the README that I can download the latest binary. Is there a way for me to download a release binary instead, so that my Travis builds don't suddenly fail every once in a while because shellcheck added a new rule on master?
@raxod502 On Travis it's probably easier to use Docker. The releases all have Docker tags and the images are tiny. It basically just automatically downloads and runs the static binary.
But yes, you can get v0.4.6 for Linux x86_64. Future release versions will be created and named in the same way, and there's a storage bucket listing with all of them.
@raxod502 As @koalaman said, I just use Docker to run shellcheck on my eless project [.travis.yml].
Most helpful comment
Once compiled, shellcheck does not depend on any Haskell libraries, just regular GNU/Linux system libraries. It will most likely run just fine when copied, since the dependencies are likely to be there already.
If you don't want any dependencies at all, you can first build shellcheck as normal, and then link it statically with
ghc -optl-static -optl-pthread -idist/build/autogen --make shellcheck. This will run on any Linux distro of the same arch.I would recommend doing that yourself, but if you'd rather just trust binaries from strangers on the internet, I also linked a static x86_64 version just now: https://www.vidarholen.net/~vidar/shellcheck.5efb724a.gz (4MB, sha256 = 733f2f8104d12d0e8b7f5e2ee5a1c0e21d4817535cb1b8a29c9f764e26baf2a7)