diff options
author | Alex Hedges <aphedges@users.noreply.github.com> | 2023-01-10 18:31:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 15:31:20 -0800 |
commit | 8d83af732a5c9ec42965f7fd94f22a96e5d9823b (patch) | |
tree | ddeca005b57018f4f697578b0210f88c43a38ad9 /var | |
parent | a5a291820296d8125810b794d03d0d1dafbc579a (diff) | |
download | spack-8d83af732a5c9ec42965f7fd94f22a96e5d9823b.tar.gz spack-8d83af732a5c9ec42965f7fd94f22a96e5d9823b.tar.bz2 spack-8d83af732a5c9ec42965f7fd94f22a96e5d9823b.tar.xz spack-8d83af732a5c9ec42965f7fd94f22a96e5d9823b.zip |
shellcheck: add new package (#34831)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/shellcheck/package.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/shellcheck/package.py b/var/spack/repos/builtin/packages/shellcheck/package.py new file mode 100644 index 0000000000..993a782c2a --- /dev/null +++ b/var/spack/repos/builtin/packages/shellcheck/package.py @@ -0,0 +1,42 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import platform + +from spack.package import * + +_versions = { + "0.9.0": { + "darwin-x86_64": "7d3730694707605d6e60cec4efcb79a0632d61babc035aa16cda1b897536acf5", + "linux-aarch64": "179c579ef3481317d130adebede74a34dbbc2df961a70916dd4039ebf0735fae", + "linux-armv6hf": "03deed9ded9dd66434ccf9649815bcde7d275d6c9f6dcf665b83391673512c75", + "linux-x86_64": "700324c6dd0ebea0117591c6cc9d7350d9c7c5c287acbad7630fa17b1d4d9e2f", + }, +} + + +class Shellcheck(Package): + """ShellCheck is a GPLv3 tool that gives warnings and suggestions for bash/sh shell scripts.""" + + homepage = "https://www.shellcheck.net" + url = "https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.linux.x86_64.tar.xz" + + maintainers = ["aphedges"] + + for ver, packages in _versions.items(): + system = platform.system().lower() + machine = platform.machine().lower() + key = "{0}-{1}".format(system, machine) + pkg_hash = packages.get(key) + if pkg_hash: + url = ( + "https://github.com/koalaman/shellcheck/releases/download" + "/v{0}/shellcheck-v{0}.{1}.{2}.tar.xz".format(ver, system, machine) + ) + version(ver, sha256=pkg_hash, url=url) + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install("shellcheck", prefix.bin) |