mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-19 21:03:51 -07:00
build: simplify Dockerfile
This commit is contained in:
parent
7dc4214149
commit
6c2cb4d009
1 changed files with 2 additions and 4 deletions
|
@ -5,17 +5,15 @@ ARG tag
|
||||||
|
|
||||||
# Put the right binary for each architecture into place for the
|
# Put the right binary for each architecture into place for the
|
||||||
# multi-architecture docker image.
|
# multi-architecture docker image.
|
||||||
|
ARG url_base="https://github.com/koalaman/shellcheck/releases/download/"
|
||||||
RUN set -x; \
|
RUN set -x; \
|
||||||
arch="$(uname -m)"; \
|
arch="$(uname -m)"; \
|
||||||
echo "arch is $arch"; \
|
echo "arch is $arch"; \
|
||||||
if [ "${arch}" = 'armv7l' ]; then \
|
if [ "${arch}" = 'armv7l' ]; then \
|
||||||
arch='armv6hf'; \
|
arch='armv6hf'; \
|
||||||
fi; \
|
fi; \
|
||||||
url_base='https://github.com/koalaman/shellcheck/releases/download/'; \
|
|
||||||
tar_file="${tag}/shellcheck-${tag}.linux.${arch}.tar.xz"; \
|
tar_file="${tag}/shellcheck-${tag}.linux.${arch}.tar.xz"; \
|
||||||
wget "${url_base}${tar_file}" -O - | tar xJf -; \
|
wget "${url_base}${tar_file}" -O - | tar -C /bin --strip-components=1 -xJf - "shellcheck-${tag}/shellcheck" && \
|
||||||
mv "shellcheck-${tag}/shellcheck" /bin/; \
|
|
||||||
rm -rf "shellcheck-${tag}"; \
|
|
||||||
ls -laF /bin/shellcheck
|
ls -laF /bin/shellcheck
|
||||||
|
|
||||||
# ShellCheck image
|
# ShellCheck image
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue