From 756258dea0236eaa85b163dd5d2c65e73afa2aa6 Mon Sep 17 00:00:00 2001 From: Daniel Braun Date: Sun, 3 Sep 2023 17:04:38 +0300 Subject: [PATCH] [Bug]: Codespaces creation fails when pre-commit feature is enabled (#515) * [Bug]: Codespaces creation fails when pre-commit feature is enabled * fix: shell lint * ci: disable missing shebang --- .github/workflows/test.yaml | 2 +- src/ansible/devcontainer-feature.json | 2 +- src/ansible/install.sh | 7 ++- src/ansible/library_scripts.sh | 45 ++++++++----------- src/aws-eb-cli/devcontainer-feature.json | 2 +- src/aws-eb-cli/install.sh | 7 ++- src/aws-eb-cli/library_scripts.sh | 45 ++++++++----------- src/bandit/devcontainer-feature.json | 2 +- src/bandit/install.sh | 7 ++- src/bandit/library_scripts.sh | 45 ++++++++----------- src/bikeshed/devcontainer-feature.json | 2 +- src/bikeshed/install.sh | 7 ++- src/bikeshed/library_scripts.sh | 45 ++++++++----------- src/black/devcontainer-feature.json | 2 +- src/black/install.sh | 7 ++- src/black/library_scripts.sh | 45 ++++++++----------- src/brownie/devcontainer-feature.json | 2 +- src/brownie/install.sh | 7 ++- src/brownie/library_scripts.sh | 45 ++++++++----------- src/buku/devcontainer-feature.json | 2 +- src/buku/install.sh | 7 ++- src/buku/library_scripts.sh | 45 ++++++++----------- src/checkov/devcontainer-feature.json | 2 +- src/checkov/install.sh | 7 ++- src/checkov/library_scripts.sh | 45 ++++++++----------- src/cloudinary-cli/devcontainer-feature.json | 2 +- src/cloudinary-cli/install.sh | 7 ++- src/cloudinary-cli/library_scripts.sh | 45 ++++++++----------- src/cookiecutter/devcontainer-feature.json | 2 +- src/cookiecutter/install.sh | 7 ++- src/cookiecutter/library_scripts.sh | 45 ++++++++----------- src/copier/devcontainer-feature.json | 2 +- src/copier/install.sh | 7 ++- src/copier/library_scripts.sh | 45 ++++++++----------- src/coverage-py/devcontainer-feature.json | 2 +- src/coverage-py/install.sh | 7 ++- src/coverage-py/library_scripts.sh | 45 ++++++++----------- src/cve-bin-tool/devcontainer-feature.json | 2 +- src/cve-bin-tool/install.sh | 7 ++- src/cve-bin-tool/library_scripts.sh | 45 ++++++++----------- .../devcontainer-feature.json | 2 +- src/cyclonedx-python/install.sh | 7 ++- src/cyclonedx-python/library_scripts.sh | 45 ++++++++----------- src/datasette/devcontainer-feature.json | 2 +- src/datasette/install.sh | 7 ++- src/datasette/library_scripts.sh | 45 ++++++++----------- src/dbt-coverage/devcontainer-feature.json | 2 +- src/dbt-coverage/install.sh | 7 ++- src/dbt-coverage/library_scripts.sh | 45 ++++++++----------- src/flake8/devcontainer-feature.json | 2 +- src/flake8/install.sh | 7 ++- src/flake8/library_scripts.sh | 45 ++++++++----------- src/flit/devcontainer-feature.json | 2 +- src/flit/install.sh | 7 ++- src/flit/library_scripts.sh | 45 ++++++++----------- src/gdbgui/devcontainer-feature.json | 2 +- src/gdbgui/install.sh | 7 ++- src/gdbgui/library_scripts.sh | 45 ++++++++----------- src/glances/devcontainer-feature.json | 2 +- src/glances/install.sh | 7 ++- src/glances/library_scripts.sh | 45 ++++++++----------- src/hatch/devcontainer-feature.json | 2 +- src/hatch/install.sh | 7 ++- src/hatch/library_scripts.sh | 45 ++++++++----------- src/invoke/devcontainer-feature.json | 2 +- src/invoke/install.sh | 7 ++- src/invoke/library_scripts.sh | 45 ++++++++----------- src/isort/devcontainer-feature.json | 2 +- src/isort/install.sh | 7 ++- src/isort/library_scripts.sh | 45 ++++++++----------- src/jake/devcontainer-feature.json | 2 +- src/jake/install.sh | 7 ++- src/jake/library_scripts.sh | 45 ++++++++----------- src/jrnl/devcontainer-feature.json | 2 +- src/jrnl/install.sh | 7 ++- src/jrnl/library_scripts.sh | 45 ++++++++----------- src/keepercommander/devcontainer-feature.json | 2 +- src/keepercommander/install.sh | 7 ++- src/keepercommander/library_scripts.sh | 45 ++++++++----------- src/lektor/devcontainer-feature.json | 2 +- src/lektor/install.sh | 7 ++- src/lektor/library_scripts.sh | 45 ++++++++----------- src/linode-cli/devcontainer-feature.json | 2 +- src/linode-cli/install.sh | 7 ++- src/linode-cli/library_scripts.sh | 45 ++++++++----------- src/localstack/devcontainer-feature.json | 2 +- src/localstack/install.sh | 5 +-- src/localstack/library_scripts.sh | 45 ++++++++----------- src/mackup/devcontainer-feature.json | 2 +- src/mackup/install.sh | 7 ++- src/mackup/library_scripts.sh | 45 ++++++++----------- src/meltano/devcontainer-feature.json | 2 +- src/meltano/install.sh | 7 ++- src/meltano/library_scripts.sh | 45 ++++++++----------- src/mitmproxy/devcontainer-feature.json | 2 +- src/mitmproxy/install.sh | 7 ++- src/mitmproxy/library_scripts.sh | 45 ++++++++----------- src/mkdocs/devcontainer-feature.json | 2 +- src/mkdocs/install.sh | 7 ++- src/mkdocs/library_scripts.sh | 45 ++++++++----------- src/mypy/devcontainer-feature.json | 2 +- src/mypy/install.sh | 7 ++- src/mypy/library_scripts.sh | 45 ++++++++----------- src/nox/devcontainer-feature.json | 2 +- src/nox/install.sh | 7 ++- src/nox/library_scripts.sh | 45 ++++++++----------- src/pdm/devcontainer-feature.json | 2 +- src/pdm/install.sh | 7 ++- src/pdm/library_scripts.sh | 45 ++++++++----------- src/pip-audit/devcontainer-feature.json | 2 +- src/pip-audit/install.sh | 7 ++- src/pip-audit/library_scripts.sh | 45 ++++++++----------- src/pipenv/devcontainer-feature.json | 2 +- src/pipenv/install.sh | 7 ++- src/pipenv/library_scripts.sh | 45 ++++++++----------- src/poetry/devcontainer-feature.json | 2 +- src/poetry/install.sh | 7 ++- src/poetry/library_scripts.sh | 45 ++++++++----------- src/pre-commit/devcontainer-feature.json | 2 +- src/pre-commit/install.sh | 9 ++-- src/pre-commit/library_scripts.sh | 45 ++++++++----------- src/pyinfra/devcontainer-feature.json | 2 +- src/pyinfra/install.sh | 7 ++- src/pyinfra/library_scripts.sh | 45 ++++++++----------- src/pylint/devcontainer-feature.json | 2 +- src/pylint/install.sh | 7 ++- src/pylint/library_scripts.sh | 45 ++++++++----------- src/pyoxidizer/devcontainer-feature.json | 2 +- src/pyoxidizer/install.sh | 7 ++- src/pyoxidizer/library_scripts.sh | 45 ++++++++----------- src/pyscaffold/devcontainer-feature.json | 2 +- src/pyscaffold/install.sh | 7 ++- src/pyscaffold/library_scripts.sh | 45 ++++++++----------- src/qrcode/devcontainer-feature.json | 2 +- src/qrcode/install.sh | 7 ++- src/qrcode/library_scripts.sh | 45 ++++++++----------- src/ruff/devcontainer-feature.json | 2 +- src/ruff/install.sh | 7 ++- src/ruff/library_scripts.sh | 45 ++++++++----------- .../devcontainer-feature.json | 2 +- src/scancode-toolkit/install.sh | 7 ++- src/scancode-toolkit/library_scripts.sh | 45 ++++++++----------- src/sigstore-python/devcontainer-feature.json | 2 +- src/sigstore-python/install.sh | 7 ++- src/sigstore-python/library_scripts.sh | 45 ++++++++----------- src/sqlfluff/devcontainer-feature.json | 2 +- src/sqlfluff/install.sh | 7 ++- src/sqlfluff/library_scripts.sh | 45 ++++++++----------- src/sqlfmt/devcontainer-feature.json | 2 +- src/sqlfmt/install.sh | 7 ++- src/sqlfmt/library_scripts.sh | 45 ++++++++----------- src/tox/devcontainer-feature.json | 2 +- src/tox/install.sh | 7 ++- src/tox/library_scripts.sh | 45 ++++++++----------- src/twine/devcontainer-feature.json | 2 +- src/twine/install.sh | 7 ++- src/twine/library_scripts.sh | 45 ++++++++----------- src/vulture/devcontainer-feature.json | 2 +- src/vulture/install.sh | 7 ++- src/vulture/library_scripts.sh | 45 ++++++++----------- src/xonsh/devcontainer-feature.json | 2 +- src/xonsh/install.sh | 7 ++- src/xonsh/library_scripts.sh | 45 ++++++++----------- src/yamllint/devcontainer-feature.json | 2 +- src/yamllint/install.sh | 7 ++- src/yamllint/library_scripts.sh | 45 ++++++++----------- src/yapf/devcontainer-feature.json | 2 +- src/yapf/install.sh | 7 ++- src/yapf/library_scripts.sh | 45 ++++++++----------- src/youtube-dl/devcontainer-feature.json | 2 +- src/youtube-dl/install.sh | 7 ++- src/youtube-dl/library_scripts.sh | 45 ++++++++----------- src/yt-dlp/devcontainer-feature.json | 2 +- src/yt-dlp/install.sh | 7 ++- src/yt-dlp/library_scripts.sh | 45 ++++++++----------- 175 files changed, 1335 insertions(+), 1799 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1b915de1a..6f2c817ad 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -140,7 +140,7 @@ jobs: for i in ${comma_separated_features//,/ } do - shellcheck --severity=error src/"$i"/*.sh + shellcheck --severity=error -e SC2148 src/"$i"/*.sh done test-global: diff --git a/src/ansible/devcontainer-feature.json b/src/ansible/devcontainer-feature.json index 1a1648947..134aa951a 100644 --- a/src/ansible/devcontainer-feature.json +++ b/src/ansible/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "ansible", - "version": "2.0.16", + "version": "2.0.17", "name": "Ansible (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/ansible", "description": "Ansible is a suite of software tools that enables infrastructure as code.", diff --git a/src/ansible/install.sh b/src/ansible/install.sh index e1d78aeb9..304632b86 100755 --- a/src/ansible/install.sh +++ b/src/ansible/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='ansible-core' --option injections='ansible' --option version="$VERSION" diff --git a/src/ansible/library_scripts.sh b/src/ansible/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/ansible/library_scripts.sh +++ b/src/ansible/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/aws-eb-cli/devcontainer-feature.json b/src/aws-eb-cli/devcontainer-feature.json index fd0368ba8..6b4399c0d 100644 --- a/src/aws-eb-cli/devcontainer-feature.json +++ b/src/aws-eb-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "aws-eb-cli", - "version": "1.0.15", + "version": "1.0.16", "name": "aws-eb-cli (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/aws-eb-cli", "description": "AWS Elastic Beanstalk CLI.", diff --git a/src/aws-eb-cli/install.sh b/src/aws-eb-cli/install.sh index 7d3bd7e50..fbf408226 100755 --- a/src/aws-eb-cli/install.sh +++ b/src/aws-eb-cli/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='awsebcli' --option version="$VERSION" diff --git a/src/aws-eb-cli/library_scripts.sh b/src/aws-eb-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/aws-eb-cli/library_scripts.sh +++ b/src/aws-eb-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/bandit/devcontainer-feature.json b/src/bandit/devcontainer-feature.json index d87a2a5e9..24dfc3afd 100644 --- a/src/bandit/devcontainer-feature.json +++ b/src/bandit/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "bandit", - "version": "2.0.16", + "version": "2.0.17", "name": "Bandit (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/bandit", "description": "Bandit is a tool designed to find common security issues in Python code.", diff --git a/src/bandit/install.sh b/src/bandit/install.sh index d7a824914..bb8096acb 100755 --- a/src/bandit/install.sh +++ b/src/bandit/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='bandit' --option version="$VERSION" diff --git a/src/bandit/library_scripts.sh b/src/bandit/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/bandit/library_scripts.sh +++ b/src/bandit/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/bikeshed/devcontainer-feature.json b/src/bikeshed/devcontainer-feature.json index 063f8d224..60278830e 100644 --- a/src/bikeshed/devcontainer-feature.json +++ b/src/bikeshed/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "bikeshed", - "version": "2.0.16", + "version": "2.0.17", "name": "Bikeshed (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/bikeshed", "description": "A preprocessor for anyone writing specifications that converts source files into actual specs.", diff --git a/src/bikeshed/install.sh b/src/bikeshed/install.sh index af41dcdc9..b3d8a1e7d 100755 --- a/src/bikeshed/install.sh +++ b/src/bikeshed/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='bikeshed' --option version="$VERSION" diff --git a/src/bikeshed/library_scripts.sh b/src/bikeshed/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/bikeshed/library_scripts.sh +++ b/src/bikeshed/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/black/devcontainer-feature.json b/src/black/devcontainer-feature.json index 66130b57b..f47659107 100644 --- a/src/black/devcontainer-feature.json +++ b/src/black/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "black", - "version": "2.0.16", + "version": "2.0.17", "name": "Black (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/black", "description": "Black is an uncompromising Python code formatter.", diff --git a/src/black/install.sh b/src/black/install.sh index 4276366a5..c43b910d9 100755 --- a/src/black/install.sh +++ b/src/black/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='black' --option version="$VERSION" diff --git a/src/black/library_scripts.sh b/src/black/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/black/library_scripts.sh +++ b/src/black/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/brownie/devcontainer-feature.json b/src/brownie/devcontainer-feature.json index 6c96e31c9..9414160d6 100644 --- a/src/brownie/devcontainer-feature.json +++ b/src/brownie/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "brownie", - "version": "2.0.16", + "version": "2.0.17", "name": "Brownie (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/brownie", "description": "Brownie is a Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.", diff --git a/src/brownie/install.sh b/src/brownie/install.sh index b62590e9c..6cc49a7d7 100755 --- a/src/brownie/install.sh +++ b/src/brownie/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ @@ -31,7 +30,7 @@ $nanolayer_location \ $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='eth-brownie' --option version="$VERSION" diff --git a/src/brownie/library_scripts.sh b/src/brownie/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/brownie/library_scripts.sh +++ b/src/brownie/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/buku/devcontainer-feature.json b/src/buku/devcontainer-feature.json index 83ccaedd8..3955257a8 100644 --- a/src/buku/devcontainer-feature.json +++ b/src/buku/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "buku", - "version": "1.0.3", + "version": "1.0.4", "name": "buku (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/buku", "description": "buku is a powerful bookmark manager and a personal textual mini-web.", diff --git a/src/buku/install.sh b/src/buku/install.sh index ee7903365..7f9791899 100755 --- a/src/buku/install.sh +++ b/src/buku/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='buku' --option version="$VERSION" diff --git a/src/buku/library_scripts.sh b/src/buku/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/buku/library_scripts.sh +++ b/src/buku/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/checkov/devcontainer-feature.json b/src/checkov/devcontainer-feature.json index cb6fb3b51..1a972d445 100644 --- a/src/checkov/devcontainer-feature.json +++ b/src/checkov/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "checkov", - "version": "1.0.15", + "version": "1.0.16", "name": "Checkov (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/checkov", "description": "Checkov is a static code analysis tool for infrastructure as code (IaC) and also a software composition analysis (SCA) tool for images and open source packages.", diff --git a/src/checkov/install.sh b/src/checkov/install.sh index 65f0d8d2b..afcad5bc1 100755 --- a/src/checkov/install.sh +++ b/src/checkov/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='checkov' --option version="$VERSION" diff --git a/src/checkov/library_scripts.sh b/src/checkov/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/checkov/library_scripts.sh +++ b/src/checkov/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/cloudinary-cli/devcontainer-feature.json b/src/cloudinary-cli/devcontainer-feature.json index 706d0ec47..d5c70d393 100644 --- a/src/cloudinary-cli/devcontainer-feature.json +++ b/src/cloudinary-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "cloudinary-cli", - "version": "1.0.15", + "version": "1.0.16", "name": "cloudinary-cli (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/cloudinary-cli", "description": "Cloudinary CLI.", diff --git a/src/cloudinary-cli/install.sh b/src/cloudinary-cli/install.sh index 9b75353af..5df447d5d 100755 --- a/src/cloudinary-cli/install.sh +++ b/src/cloudinary-cli/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='cloudinary-cli' --option version="$VERSION" diff --git a/src/cloudinary-cli/library_scripts.sh b/src/cloudinary-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/cloudinary-cli/library_scripts.sh +++ b/src/cloudinary-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/cookiecutter/devcontainer-feature.json b/src/cookiecutter/devcontainer-feature.json index 6f49467e3..36635771d 100644 --- a/src/cookiecutter/devcontainer-feature.json +++ b/src/cookiecutter/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "cookiecutter", - "version": "2.0.16", + "version": "2.0.17", "name": "Cookiecutter (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/cookiecutter", "description": "Cookiecutter creates projects from project templates.", diff --git a/src/cookiecutter/install.sh b/src/cookiecutter/install.sh index 3aefd5f60..7f9c9fc74 100755 --- a/src/cookiecutter/install.sh +++ b/src/cookiecutter/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='cookiecutter' --option version="$VERSION" diff --git a/src/cookiecutter/library_scripts.sh b/src/cookiecutter/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/cookiecutter/library_scripts.sh +++ b/src/cookiecutter/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/copier/devcontainer-feature.json b/src/copier/devcontainer-feature.json index 899ae234e..7e0cda52d 100644 --- a/src/copier/devcontainer-feature.json +++ b/src/copier/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "copier", - "version": "7.0.12", + "version": "7.0.13", "name": "copier (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/copier", "description": "copier creates projects from project templates.", diff --git a/src/copier/install.sh b/src/copier/install.sh index 960e81fa2..a4ccee8ce 100755 --- a/src/copier/install.sh +++ b/src/copier/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='copier' --option version="$VERSION" diff --git a/src/copier/library_scripts.sh b/src/copier/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/copier/library_scripts.sh +++ b/src/copier/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/coverage-py/devcontainer-feature.json b/src/coverage-py/devcontainer-feature.json index b138692f4..8cbcfbc43 100644 --- a/src/coverage-py/devcontainer-feature.json +++ b/src/coverage-py/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "coverage-py", - "version": "2.0.16", + "version": "2.0.17", "name": "Coverage.py (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/coverage-py", "description": "Coverage.py is a tool for measuring code coverage of Python programs.", diff --git a/src/coverage-py/install.sh b/src/coverage-py/install.sh index bcf91d553..68f4f01c9 100755 --- a/src/coverage-py/install.sh +++ b/src/coverage-py/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='coverage' --option version="$VERSION" diff --git a/src/coverage-py/library_scripts.sh b/src/coverage-py/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/coverage-py/library_scripts.sh +++ b/src/coverage-py/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/cve-bin-tool/devcontainer-feature.json b/src/cve-bin-tool/devcontainer-feature.json index 610e71dc7..5839b0834 100644 --- a/src/cve-bin-tool/devcontainer-feature.json +++ b/src/cve-bin-tool/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "cve-bin-tool", - "version": "1.0.3", + "version": "1.0.4", "name": "CVE Binary Tool (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/cve-bin-tool", "description": "The CVE Binary Tool is a free, open source tool to help you find known vulnerabilities in software, using data from the National Vulnerability Database (NVD) list of Common Vulnerabilities and Exposures (CVEs).", diff --git a/src/cve-bin-tool/install.sh b/src/cve-bin-tool/install.sh index d6fea9cb6..cbeb160db 100755 --- a/src/cve-bin-tool/install.sh +++ b/src/cve-bin-tool/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='cve-bin-tool' --option version="$VERSION" diff --git a/src/cve-bin-tool/library_scripts.sh b/src/cve-bin-tool/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/cve-bin-tool/library_scripts.sh +++ b/src/cve-bin-tool/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/cyclonedx-python/devcontainer-feature.json b/src/cyclonedx-python/devcontainer-feature.json index 3e3ce9448..3e20520fb 100644 --- a/src/cyclonedx-python/devcontainer-feature.json +++ b/src/cyclonedx-python/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "cyclonedx-python", - "version": "1.0.3", + "version": "1.0.4", "name": "CycloneDX Python (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/cyclonedx-python", "description": "CycloneDX Python creates CycloneDX Software Bill of Materials (SBOM) from Python projects and environments.", diff --git a/src/cyclonedx-python/install.sh b/src/cyclonedx-python/install.sh index ed689e6a2..ce815078d 100755 --- a/src/cyclonedx-python/install.sh +++ b/src/cyclonedx-python/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='cyclonedx-bom' --option version="$VERSION" diff --git a/src/cyclonedx-python/library_scripts.sh b/src/cyclonedx-python/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/cyclonedx-python/library_scripts.sh +++ b/src/cyclonedx-python/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/datasette/devcontainer-feature.json b/src/datasette/devcontainer-feature.json index 5728fdf7a..898887417 100644 --- a/src/datasette/devcontainer-feature.json +++ b/src/datasette/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "datasette", - "version": "2.0.16", + "version": "2.0.17", "name": "Datasette (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/datasette", "description": "Datasette is a tool for exploring and publishing data and is aimed at data journalists, museum curators, archivists, local governments, scientists and researchers.", diff --git a/src/datasette/install.sh b/src/datasette/install.sh index 52a0153ab..68c0457ee 100755 --- a/src/datasette/install.sh +++ b/src/datasette/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='datasette' --option version="$VERSION" diff --git a/src/datasette/library_scripts.sh b/src/datasette/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/datasette/library_scripts.sh +++ b/src/datasette/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/dbt-coverage/devcontainer-feature.json b/src/dbt-coverage/devcontainer-feature.json index 8af6b6ab3..a1912576a 100644 --- a/src/dbt-coverage/devcontainer-feature.json +++ b/src/dbt-coverage/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "dbt-coverage", - "version": "1.0.0", + "version": "1.0.1", "name": "dbt-coverage (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/dbt-coverage", "description": "dbt-coverage is a one-stop-shop for docs and test coverage of dbt projects.", diff --git a/src/dbt-coverage/install.sh b/src/dbt-coverage/install.sh index bc8b66728..ef9de66fe 100755 --- a/src/dbt-coverage/install.sh +++ b/src/dbt-coverage/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='dbt-coverage' --option version="$VERSION" diff --git a/src/dbt-coverage/library_scripts.sh b/src/dbt-coverage/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/dbt-coverage/library_scripts.sh +++ b/src/dbt-coverage/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/flake8/devcontainer-feature.json b/src/flake8/devcontainer-feature.json index 610e0b63e..7cd1f45c4 100644 --- a/src/flake8/devcontainer-feature.json +++ b/src/flake8/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "flake8", - "version": "2.0.16", + "version": "2.0.17", "name": "Flake8 (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/flake8", "description": "Flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins.", diff --git a/src/flake8/install.sh b/src/flake8/install.sh index beca701fb..c1bbe06b5 100755 --- a/src/flake8/install.sh +++ b/src/flake8/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='flake8' --option injections="$PLUGINS" --option version="$VERSION" diff --git a/src/flake8/library_scripts.sh b/src/flake8/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/flake8/library_scripts.sh +++ b/src/flake8/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/flit/devcontainer-feature.json b/src/flit/devcontainer-feature.json index fd7199afc..56e26803f 100644 --- a/src/flit/devcontainer-feature.json +++ b/src/flit/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "flit", - "version": "2.0.16", + "version": "2.0.17", "name": "Flit (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/flit", "description": "Flit is a simple way to put Python packages and modules on PyPI.", diff --git a/src/flit/install.sh b/src/flit/install.sh index f11fb2ff8..fcb67b030 100755 --- a/src/flit/install.sh +++ b/src/flit/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='flit' --option version="$VERSION" diff --git a/src/flit/library_scripts.sh b/src/flit/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/flit/library_scripts.sh +++ b/src/flit/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/gdbgui/devcontainer-feature.json b/src/gdbgui/devcontainer-feature.json index b033a577e..b181a9d96 100644 --- a/src/gdbgui/devcontainer-feature.json +++ b/src/gdbgui/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "gdbgui", - "version": "2.0.16", + "version": "2.0.17", "name": "gdbgui (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/gdbgui", "description": "gdbgui is a browser-based frontend to gdb (gnu debugger).", diff --git a/src/gdbgui/install.sh b/src/gdbgui/install.sh index 4620eff17..36fd154c6 100755 --- a/src/gdbgui/install.sh +++ b/src/gdbgui/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='gdbgui' --option version="$VERSION" diff --git a/src/gdbgui/library_scripts.sh b/src/gdbgui/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/gdbgui/library_scripts.sh +++ b/src/gdbgui/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/glances/devcontainer-feature.json b/src/glances/devcontainer-feature.json index da2d2e3a4..acd27324a 100644 --- a/src/glances/devcontainer-feature.json +++ b/src/glances/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "glances", - "version": "2.0.16", + "version": "2.0.17", "name": "Glances (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/glances", "description": "Glances is a cross-platform monitoring tool which aims to present a large amount of monitoring information through a curses or Web based interface.", diff --git a/src/glances/install.sh b/src/glances/install.sh index d0c05940b..ac3bcbdb1 100755 --- a/src/glances/install.sh +++ b/src/glances/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='glances[action,browser,cloud,cpuinfo,docker,export,folders,gpu,graph,ip,raid,snmp,web,wifi]' --option version="$VERSION" diff --git a/src/glances/library_scripts.sh b/src/glances/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/glances/library_scripts.sh +++ b/src/glances/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/hatch/devcontainer-feature.json b/src/hatch/devcontainer-feature.json index 342274493..4f45b83ee 100644 --- a/src/hatch/devcontainer-feature.json +++ b/src/hatch/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "hatch", - "version": "2.0.16", + "version": "2.0.17", "name": "Hatch (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/hatch", "description": "Hatch is a modern, extensible Python project manager.", diff --git a/src/hatch/install.sh b/src/hatch/install.sh index b00cba190..17fd9594c 100755 --- a/src/hatch/install.sh +++ b/src/hatch/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='hatch' --option version="$VERSION" diff --git a/src/hatch/library_scripts.sh b/src/hatch/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/hatch/library_scripts.sh +++ b/src/hatch/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/invoke/devcontainer-feature.json b/src/invoke/devcontainer-feature.json index a79cebe71..cc76f0ed2 100644 --- a/src/invoke/devcontainer-feature.json +++ b/src/invoke/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "invoke", - "version": "1.0.2", + "version": "1.0.3", "name": "Invoke (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/invoke", "description": "Invoke is a Python (2.7 and 3.4+) library for managing shell-oriented subprocesses and organizing executable Python code into CLI-invokable tasks. It draws inspiration from various sources (make/rake, Fabric 1.x, etc) to arrive at a powerful & clean feature set.", diff --git a/src/invoke/install.sh b/src/invoke/install.sh index 4f95c4505..dd43b5f90 100755 --- a/src/invoke/install.sh +++ b/src/invoke/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='invoke' --option version="$VERSION" diff --git a/src/invoke/library_scripts.sh b/src/invoke/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/invoke/library_scripts.sh +++ b/src/invoke/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/isort/devcontainer-feature.json b/src/isort/devcontainer-feature.json index 21bde3f2e..e34de27c2 100644 --- a/src/isort/devcontainer-feature.json +++ b/src/isort/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "isort", - "version": "2.0.16", + "version": "2.0.17", "name": "isort (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/isort", "description": "isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.", diff --git a/src/isort/install.sh b/src/isort/install.sh index fc3e9016c..877d9d2c2 100755 --- a/src/isort/install.sh +++ b/src/isort/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='isort' --option version="$VERSION" diff --git a/src/isort/library_scripts.sh b/src/isort/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/isort/library_scripts.sh +++ b/src/isort/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/jake/devcontainer-feature.json b/src/jake/devcontainer-feature.json index f3ed7ac2d..ec94976bd 100644 --- a/src/jake/devcontainer-feature.json +++ b/src/jake/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "jake", - "version": "1.0.3", + "version": "1.0.4", "name": "jake (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/jake", "description": "jake is a tool to check your Python environments for vulnerable Open Source packages with OSS Index or Sonatype Nexus Lifecycle.", diff --git a/src/jake/install.sh b/src/jake/install.sh index 021a64a22..4fd643db3 100755 --- a/src/jake/install.sh +++ b/src/jake/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='jake' --option version="$VERSION" diff --git a/src/jake/library_scripts.sh b/src/jake/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/jake/library_scripts.sh +++ b/src/jake/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/jrnl/devcontainer-feature.json b/src/jrnl/devcontainer-feature.json index 936f59a38..87865d36c 100644 --- a/src/jrnl/devcontainer-feature.json +++ b/src/jrnl/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "jrnl", - "version": "2.0.16", + "version": "2.0.17", "name": "jrnl (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/jrnl", "description": "jrnl is a simple journal application for the command line.", diff --git a/src/jrnl/install.sh b/src/jrnl/install.sh index 508fc1d84..c9555e437 100755 --- a/src/jrnl/install.sh +++ b/src/jrnl/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='jrnl' --option version="$VERSION" diff --git a/src/jrnl/library_scripts.sh b/src/jrnl/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/jrnl/library_scripts.sh +++ b/src/jrnl/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/keepercommander/devcontainer-feature.json b/src/keepercommander/devcontainer-feature.json index 314ff314f..6da2ae75c 100644 --- a/src/keepercommander/devcontainer-feature.json +++ b/src/keepercommander/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "keepercommander", - "version": "1.0.3", + "version": "1.0.4", "name": "Keeper Commander (Keeper CLI) (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/keepercommander", "description": "Keeper Commander is a command-line and SDK interface to Keeper\u00ae Password Manager. Commander can be used to access and control your Keeper vault, perform administrative functions (such as end-user onboarding and data import/export), launch remote sessions, rotate passwords, eliminate hardcoded passwords and more.", diff --git a/src/keepercommander/install.sh b/src/keepercommander/install.sh index 0e55cebc4..1c5220783 100755 --- a/src/keepercommander/install.sh +++ b/src/keepercommander/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='keepercommander' --option version="$VERSION" diff --git a/src/keepercommander/library_scripts.sh b/src/keepercommander/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/keepercommander/library_scripts.sh +++ b/src/keepercommander/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/lektor/devcontainer-feature.json b/src/lektor/devcontainer-feature.json index 1b3c973c6..d58740382 100644 --- a/src/lektor/devcontainer-feature.json +++ b/src/lektor/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "lektor", - "version": "2.0.16", + "version": "2.0.17", "name": "Lektor (via npm)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/lektor", "description": "Lektor is a static website generator.", diff --git a/src/lektor/install.sh b/src/lektor/install.sh index 009cb3f5e..25c730b9b 100755 --- a/src/lektor/install.sh +++ b/src/lektor/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='lektor' --option version="$VERSION" diff --git a/src/lektor/library_scripts.sh b/src/lektor/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/lektor/library_scripts.sh +++ b/src/lektor/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/linode-cli/devcontainer-feature.json b/src/linode-cli/devcontainer-feature.json index 28469f9d0..48e114e7a 100644 --- a/src/linode-cli/devcontainer-feature.json +++ b/src/linode-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "linode-cli", - "version": "1.0.1", + "version": "1.0.2", "name": "Linode CLI (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/linode-cli", "description": "Access the entire Linode platform from the command line, easily adding, removing, or modifing services.", diff --git a/src/linode-cli/install.sh b/src/linode-cli/install.sh index 404889e3d..b5f3a1cc6 100755 --- a/src/linode-cli/install.sh +++ b/src/linode-cli/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='linode-cli' --option version="$VERSION" diff --git a/src/linode-cli/library_scripts.sh b/src/linode-cli/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/linode-cli/library_scripts.sh +++ b/src/linode-cli/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/localstack/devcontainer-feature.json b/src/localstack/devcontainer-feature.json index a1c6a58ca..da597936b 100644 --- a/src/localstack/devcontainer-feature.json +++ b/src/localstack/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "localstack", - "version": "2.0.21", + "version": "2.0.22", "name": "Localstack (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/localstack", "description": "Localstack is a fully functional local AWS cloud stack.", diff --git a/src/localstack/install.sh b/src/localstack/install.sh index 717ae2541..3d1c382fb 100755 --- a/src/localstack/install.sh +++ b/src/localstack/install.sh @@ -1,15 +1,14 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ diff --git a/src/localstack/library_scripts.sh b/src/localstack/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/localstack/library_scripts.sh +++ b/src/localstack/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/mackup/devcontainer-feature.json b/src/mackup/devcontainer-feature.json index 088119e43..f1f0c920e 100644 --- a/src/mackup/devcontainer-feature.json +++ b/src/mackup/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "mackup", - "version": "1.0.3", + "version": "1.0.4", "name": "Mackup (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/mackup", "description": "Mackup keeps your application settings in sync (OS X/Linux).", diff --git a/src/mackup/install.sh b/src/mackup/install.sh index 62b3d7a5a..31c1a5fd1 100755 --- a/src/mackup/install.sh +++ b/src/mackup/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='mackup' --option version="$VERSION" diff --git a/src/mackup/library_scripts.sh b/src/mackup/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/mackup/library_scripts.sh +++ b/src/mackup/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/meltano/devcontainer-feature.json b/src/meltano/devcontainer-feature.json index b71b39fbe..d638f7345 100644 --- a/src/meltano/devcontainer-feature.json +++ b/src/meltano/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "meltano", - "version": "2.0.16", + "version": "2.0.17", "name": "Meltano ELT (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/meltano", "description": "Meltano lets you extract and load data with a software development-inspired approach that that delivers flexibility and limitless collaboration.", diff --git a/src/meltano/install.sh b/src/meltano/install.sh index 2d180f887..aa93e9b58 100755 --- a/src/meltano/install.sh +++ b/src/meltano/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='meltano' --option version="$VERSION" diff --git a/src/meltano/library_scripts.sh b/src/meltano/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/meltano/library_scripts.sh +++ b/src/meltano/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/mitmproxy/devcontainer-feature.json b/src/mitmproxy/devcontainer-feature.json index 11789c31f..1c784405f 100644 --- a/src/mitmproxy/devcontainer-feature.json +++ b/src/mitmproxy/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "mitmproxy", - "version": "2.0.16", + "version": "2.0.17", "name": "mitmproxy (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/mitmproxy", "description": "mitmproxy is an interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers", diff --git a/src/mitmproxy/install.sh b/src/mitmproxy/install.sh index 280277e32..ccc2d47c2 100755 --- a/src/mitmproxy/install.sh +++ b/src/mitmproxy/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='mitmproxy' --option version="$VERSION" diff --git a/src/mitmproxy/library_scripts.sh b/src/mitmproxy/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/mitmproxy/library_scripts.sh +++ b/src/mitmproxy/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/mkdocs/devcontainer-feature.json b/src/mkdocs/devcontainer-feature.json index 5ede67a20..696608747 100644 --- a/src/mkdocs/devcontainer-feature.json +++ b/src/mkdocs/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "mkdocs", - "version": "2.0.16", + "version": "2.0.17", "name": "MkDocs (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/mkdocs", "description": "MkDocs is a fast, simple and downright gorgeous static site generator that's geared towards building project documentation.", diff --git a/src/mkdocs/install.sh b/src/mkdocs/install.sh index 1ba792da6..06aac8582 100755 --- a/src/mkdocs/install.sh +++ b/src/mkdocs/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='mkdocs' --option injections="$PLUGINS" --option version="$VERSION" diff --git a/src/mkdocs/library_scripts.sh b/src/mkdocs/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/mkdocs/library_scripts.sh +++ b/src/mkdocs/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/mypy/devcontainer-feature.json b/src/mypy/devcontainer-feature.json index 3592dfc08..80de5b65c 100644 --- a/src/mypy/devcontainer-feature.json +++ b/src/mypy/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "mypy", - "version": "2.0.16", + "version": "2.0.17", "name": "Mypy (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/mypy", "description": "Mypy is a static type checker for Python.", diff --git a/src/mypy/install.sh b/src/mypy/install.sh index 399f57f34..148ec6bc9 100755 --- a/src/mypy/install.sh +++ b/src/mypy/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='mypy' --option version="$VERSION" diff --git a/src/mypy/library_scripts.sh b/src/mypy/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/mypy/library_scripts.sh +++ b/src/mypy/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/nox/devcontainer-feature.json b/src/nox/devcontainer-feature.json index d1ed615ef..f449eff54 100644 --- a/src/nox/devcontainer-feature.json +++ b/src/nox/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "nox", - "version": "2.0.16", + "version": "2.0.17", "name": "nox (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/nox", "description": "nox is a command-line tool that automates testing in multiple Python environments.", diff --git a/src/nox/install.sh b/src/nox/install.sh index c898a5093..79936d8d6 100755 --- a/src/nox/install.sh +++ b/src/nox/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='nox' --option version="$VERSION" diff --git a/src/nox/library_scripts.sh b/src/nox/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/nox/library_scripts.sh +++ b/src/nox/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/pdm/devcontainer-feature.json b/src/pdm/devcontainer-feature.json index 27796fb6c..1e71810f3 100644 --- a/src/pdm/devcontainer-feature.json +++ b/src/pdm/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "pdm", - "version": "2.0.16", + "version": "2.0.17", "name": "PDM (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/pdm", "description": "PDM is a modern Python package and dependency manager supporting the latest PEP standards.", diff --git a/src/pdm/install.sh b/src/pdm/install.sh index f98dac784..5c486c001 100755 --- a/src/pdm/install.sh +++ b/src/pdm/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='pdm' --option version="$VERSION" diff --git a/src/pdm/library_scripts.sh b/src/pdm/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/pdm/library_scripts.sh +++ b/src/pdm/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/pip-audit/devcontainer-feature.json b/src/pip-audit/devcontainer-feature.json index 60ee167cb..bde9de918 100644 --- a/src/pip-audit/devcontainer-feature.json +++ b/src/pip-audit/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "pip-audit", - "version": "1.0.3", + "version": "1.0.4", "name": "CVE Binary Tool (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/pip-audit", "description": "pip-audit is a tool for scanning Python environments for packages with known vulnerabilities.", diff --git a/src/pip-audit/install.sh b/src/pip-audit/install.sh index 2466ce9f4..66ee781a9 100755 --- a/src/pip-audit/install.sh +++ b/src/pip-audit/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='pip-audit' --option version="$VERSION" diff --git a/src/pip-audit/library_scripts.sh b/src/pip-audit/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/pip-audit/library_scripts.sh +++ b/src/pip-audit/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/pipenv/devcontainer-feature.json b/src/pipenv/devcontainer-feature.json index 7f3cfa4de..174ad20b0 100644 --- a/src/pipenv/devcontainer-feature.json +++ b/src/pipenv/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "pipenv", - "version": "2.0.16", + "version": "2.0.17", "name": "Pipenv (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/pipenv", "description": "Pipenv automatically creates and manages a virtualenv for your projects.", diff --git a/src/pipenv/install.sh b/src/pipenv/install.sh index 7855ce75d..867a4680d 100755 --- a/src/pipenv/install.sh +++ b/src/pipenv/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='pipenv' --option version="$VERSION" diff --git a/src/pipenv/library_scripts.sh b/src/pipenv/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/pipenv/library_scripts.sh +++ b/src/pipenv/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/poetry/devcontainer-feature.json b/src/poetry/devcontainer-feature.json index 9819851e8..ac6a34d8e 100644 --- a/src/poetry/devcontainer-feature.json +++ b/src/poetry/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "poetry", - "version": "2.0.16", + "version": "2.0.17", "name": "Poetry (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/poetry", "description": "Poetry is a tool for dependency management and packaging in Python.", diff --git a/src/poetry/install.sh b/src/poetry/install.sh index 88236a65b..31c6a6216 100755 --- a/src/poetry/install.sh +++ b/src/poetry/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='poetry' --option version="$VERSION" diff --git a/src/poetry/library_scripts.sh b/src/poetry/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/poetry/library_scripts.sh +++ b/src/poetry/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/pre-commit/devcontainer-feature.json b/src/pre-commit/devcontainer-feature.json index 1677b4869..0d824b9c6 100644 --- a/src/pre-commit/devcontainer-feature.json +++ b/src/pre-commit/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "pre-commit", - "version": "2.0.16", + "version": "2.0.17", "name": "Pre-Commit (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/pre-commit", "description": "Pre-Commit is a framework for managing and maintaining multi-language pre-commit hooks.", diff --git a/src/pre-commit/install.sh b/src/pre-commit/install.sh index 6d181480e..2910df414 100755 --- a/src/pre-commit/install.sh +++ b/src/pre-commit/install.sh @@ -1,22 +1,21 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ - --option package='pre-commit' --option version="$VERSION" --verbose + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ + --option package='pre-commit' --option version="$VERSION" diff --git a/src/pre-commit/library_scripts.sh b/src/pre-commit/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/pre-commit/library_scripts.sh +++ b/src/pre-commit/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/pyinfra/devcontainer-feature.json b/src/pyinfra/devcontainer-feature.json index 1154f47c8..b4efc7dc9 100644 --- a/src/pyinfra/devcontainer-feature.json +++ b/src/pyinfra/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "pyinfra", - "version": "2.0.16", + "version": "2.0.17", "name": "pyinfra (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/pyinfra", "description": "pyinfra is a Python alternative to Ansible where you don't write your deployment in YAML file, but in Python.", diff --git a/src/pyinfra/install.sh b/src/pyinfra/install.sh index 03edff676..8e8365cd1 100755 --- a/src/pyinfra/install.sh +++ b/src/pyinfra/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='pyinfra' --option version="$VERSION" diff --git a/src/pyinfra/library_scripts.sh b/src/pyinfra/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/pyinfra/library_scripts.sh +++ b/src/pyinfra/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/pylint/devcontainer-feature.json b/src/pylint/devcontainer-feature.json index 3bfed1a4d..ba48e5449 100644 --- a/src/pylint/devcontainer-feature.json +++ b/src/pylint/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "pylint", - "version": "2.0.16", + "version": "2.0.17", "name": "Pylint (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/pylint", "description": "Pylint is a static code analyser for Python 2 or 3.", diff --git a/src/pylint/install.sh b/src/pylint/install.sh index 106be12b7..1a9390c64 100755 --- a/src/pylint/install.sh +++ b/src/pylint/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='pylint' --option version="$VERSION" diff --git a/src/pylint/library_scripts.sh b/src/pylint/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/pylint/library_scripts.sh +++ b/src/pylint/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/pyoxidizer/devcontainer-feature.json b/src/pyoxidizer/devcontainer-feature.json index 263f39720..659c60696 100644 --- a/src/pyoxidizer/devcontainer-feature.json +++ b/src/pyoxidizer/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "pyoxidizer", - "version": "1.0.4", + "version": "1.0.5", "name": "PyOxidizer (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/pyoxidizer", "description": "PyOxidizer is a modern Python application packaging and distribution tool.", diff --git a/src/pyoxidizer/install.sh b/src/pyoxidizer/install.sh index 485c7ee67..51250bf8c 100755 --- a/src/pyoxidizer/install.sh +++ b/src/pyoxidizer/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='pyoxidizer' --option version="$VERSION" diff --git a/src/pyoxidizer/library_scripts.sh b/src/pyoxidizer/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/pyoxidizer/library_scripts.sh +++ b/src/pyoxidizer/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/pyscaffold/devcontainer-feature.json b/src/pyscaffold/devcontainer-feature.json index 59f764aa8..282df28a2 100644 --- a/src/pyscaffold/devcontainer-feature.json +++ b/src/pyscaffold/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "pyscaffold", - "version": "2.0.16", + "version": "2.0.17", "name": "PyScaffold (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/pyscaffold", "description": "PyScaffold is a python project template generator with batteries included.", diff --git a/src/pyscaffold/install.sh b/src/pyscaffold/install.sh index 22a3bfb59..3196f1ba4 100755 --- a/src/pyscaffold/install.sh +++ b/src/pyscaffold/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='pyscaffold[all]' --option version="$VERSION" diff --git a/src/pyscaffold/library_scripts.sh b/src/pyscaffold/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/pyscaffold/library_scripts.sh +++ b/src/pyscaffold/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/qrcode/devcontainer-feature.json b/src/qrcode/devcontainer-feature.json index c963707aa..7d7e5d329 100644 --- a/src/qrcode/devcontainer-feature.json +++ b/src/qrcode/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "qrcode", - "version": "2.0.16", + "version": "2.0.17", "name": "qrcode (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/qrcode", "description": "qrcode is a command line QR-Code generator.", diff --git a/src/qrcode/install.sh b/src/qrcode/install.sh index 18f72b430..c841de242 100755 --- a/src/qrcode/install.sh +++ b/src/qrcode/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='qrcode[pil]' --option version="$VERSION" diff --git a/src/qrcode/library_scripts.sh b/src/qrcode/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/qrcode/library_scripts.sh +++ b/src/qrcode/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/ruff/devcontainer-feature.json b/src/ruff/devcontainer-feature.json index 2f9d6202c..9956ac204 100644 --- a/src/ruff/devcontainer-feature.json +++ b/src/ruff/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "ruff", - "version": "1.0.0", + "version": "1.0.1", "name": "Ruff (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/ruff", "description": "Ruff is an extremely fast Python linter, written in Rust.", diff --git a/src/ruff/install.sh b/src/ruff/install.sh index 0ef77e9fd..1e2bb2c86 100755 --- a/src/ruff/install.sh +++ b/src/ruff/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='ruff' --option version="$VERSION" diff --git a/src/ruff/library_scripts.sh b/src/ruff/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/ruff/library_scripts.sh +++ b/src/ruff/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/scancode-toolkit/devcontainer-feature.json b/src/scancode-toolkit/devcontainer-feature.json index 97dc2ca6a..0724a8a0d 100644 --- a/src/scancode-toolkit/devcontainer-feature.json +++ b/src/scancode-toolkit/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "scancode-toolkit", - "version": "1.0.3", + "version": "1.0.4", "name": "Scan (SAST) (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/scancode-toolkit", "description": "ScanCode scan code to detect packages and dependencies, licenses, copyrights and more.", diff --git a/src/scancode-toolkit/install.sh b/src/scancode-toolkit/install.sh index 6e1e93d49..d71f189af 100755 --- a/src/scancode-toolkit/install.sh +++ b/src/scancode-toolkit/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='scancode-toolkit' --option version="$VERSION" diff --git a/src/scancode-toolkit/library_scripts.sh b/src/scancode-toolkit/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/scancode-toolkit/library_scripts.sh +++ b/src/scancode-toolkit/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/sigstore-python/devcontainer-feature.json b/src/sigstore-python/devcontainer-feature.json index 1f8c38f8f..d77efcd41 100644 --- a/src/sigstore-python/devcontainer-feature.json +++ b/src/sigstore-python/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "sigstore-python", - "version": "1.0.3", + "version": "1.0.4", "name": "sigstore-python (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/ansible", "description": "sigstore-python is a Python tool for generating and verifying Sigstore signatures. You can use it to sign and verify Python package distributions, or anything else!", diff --git a/src/sigstore-python/install.sh b/src/sigstore-python/install.sh index 31871ad02..5ba80c273 100755 --- a/src/sigstore-python/install.sh +++ b/src/sigstore-python/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='sigstore' --option version="$VERSION" diff --git a/src/sigstore-python/library_scripts.sh b/src/sigstore-python/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/sigstore-python/library_scripts.sh +++ b/src/sigstore-python/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/sqlfluff/devcontainer-feature.json b/src/sqlfluff/devcontainer-feature.json index e11572633..5754edd85 100644 --- a/src/sqlfluff/devcontainer-feature.json +++ b/src/sqlfluff/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "sqlfluff", - "version": "1.0.0", + "version": "1.0.1", "name": "SqlFluff (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/sqlfluff", "description": "Fluff is an extensible and modular linter designed to help you write good SQL and catch errors and bad SQL before it hits your database.", diff --git a/src/sqlfluff/install.sh b/src/sqlfluff/install.sh index 7dec1871f..b09254870 100755 --- a/src/sqlfluff/install.sh +++ b/src/sqlfluff/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='sqlfluff' --option version="$VERSION" diff --git a/src/sqlfluff/library_scripts.sh b/src/sqlfluff/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/sqlfluff/library_scripts.sh +++ b/src/sqlfluff/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/sqlfmt/devcontainer-feature.json b/src/sqlfmt/devcontainer-feature.json index 3ece0bd44..4242ad162 100644 --- a/src/sqlfmt/devcontainer-feature.json +++ b/src/sqlfmt/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "sqlfmt", - "version": "1.0.0", + "version": "1.0.1", "name": "sqlfmt (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/sqlfmt", "description": "sqlfmt formats your dbt SQL files so you don't have to.", diff --git a/src/sqlfmt/install.sh b/src/sqlfmt/install.sh index bf2253dfe..70bc42b5e 100755 --- a/src/sqlfmt/install.sh +++ b/src/sqlfmt/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='shandy-sqlfmt[jinjafmt]' --option version="$VERSION" diff --git a/src/sqlfmt/library_scripts.sh b/src/sqlfmt/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/sqlfmt/library_scripts.sh +++ b/src/sqlfmt/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/tox/devcontainer-feature.json b/src/tox/devcontainer-feature.json index 2b732624a..2667fa5be 100644 --- a/src/tox/devcontainer-feature.json +++ b/src/tox/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "tox", - "version": "2.0.16", + "version": "2.0.17", "name": "tox (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/tox", "description": "tox is a generic virtual environment management and test command line tool.", diff --git a/src/tox/install.sh b/src/tox/install.sh index 61293af26..b06a844a0 100755 --- a/src/tox/install.sh +++ b/src/tox/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='tox' --option version="$VERSION" diff --git a/src/tox/library_scripts.sh b/src/tox/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/tox/library_scripts.sh +++ b/src/tox/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/twine/devcontainer-feature.json b/src/twine/devcontainer-feature.json index 16daa388a..f52ed9bc6 100644 --- a/src/twine/devcontainer-feature.json +++ b/src/twine/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "twine", - "version": "2.0.16", + "version": "2.0.17", "name": "Twine (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/twine", "description": "Twine is a utility for publishing Python packages on PyPI.", diff --git a/src/twine/install.sh b/src/twine/install.sh index 1d12e251c..d96529e0d 100755 --- a/src/twine/install.sh +++ b/src/twine/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='twine' --option version="$VERSION" diff --git a/src/twine/library_scripts.sh b/src/twine/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/twine/library_scripts.sh +++ b/src/twine/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/vulture/devcontainer-feature.json b/src/vulture/devcontainer-feature.json index 9a6a77b68..166d1c11d 100644 --- a/src/vulture/devcontainer-feature.json +++ b/src/vulture/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "vulture", - "version": "2.0.16", + "version": "2.0.17", "name": "Vulture (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/vulture", "description": "Vulture finds unused code in Python programs.", diff --git a/src/vulture/install.sh b/src/vulture/install.sh index eb83817cc..fcd6951a8 100755 --- a/src/vulture/install.sh +++ b/src/vulture/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='vulture' --option version="$VERSION" diff --git a/src/vulture/library_scripts.sh b/src/vulture/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/vulture/library_scripts.sh +++ b/src/vulture/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/xonsh/devcontainer-feature.json b/src/xonsh/devcontainer-feature.json index a7ef3896f..f7ea6117a 100644 --- a/src/xonsh/devcontainer-feature.json +++ b/src/xonsh/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "xonsh", - "version": "1.0.3", + "version": "1.0.4", "name": "Xonsh (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/xonsh", "description": "Xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt.", diff --git a/src/xonsh/install.sh b/src/xonsh/install.sh index cc9468b81..86a1e904f 100755 --- a/src/xonsh/install.sh +++ b/src/xonsh/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='xonsh[all]' --option version="$VERSION" diff --git a/src/xonsh/library_scripts.sh b/src/xonsh/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/xonsh/library_scripts.sh +++ b/src/xonsh/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/yamllint/devcontainer-feature.json b/src/yamllint/devcontainer-feature.json index f7ec6102b..1f07d3753 100644 --- a/src/yamllint/devcontainer-feature.json +++ b/src/yamllint/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "yamllint", - "version": "2.0.16", + "version": "2.0.17", "name": "yamllint (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/yamllint", "description": "yamllint is a Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.", diff --git a/src/yamllint/install.sh b/src/yamllint/install.sh index f26b8d39c..3b1b3af3c 100755 --- a/src/yamllint/install.sh +++ b/src/yamllint/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='yamllint' --option version="$VERSION" diff --git a/src/yamllint/library_scripts.sh b/src/yamllint/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/yamllint/library_scripts.sh +++ b/src/yamllint/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/yapf/devcontainer-feature.json b/src/yapf/devcontainer-feature.json index c4e46fe7c..4c9d6e6b7 100644 --- a/src/yapf/devcontainer-feature.json +++ b/src/yapf/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "yapf", - "version": "2.0.16", + "version": "2.0.17", "name": "yapf (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/yapf", "description": "yapf is a formatter for Python files.", diff --git a/src/yapf/install.sh b/src/yapf/install.sh index b98e78921..b38f4a770 100755 --- a/src/yapf/install.sh +++ b/src/yapf/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='yapf' --option version="$VERSION" diff --git a/src/yapf/library_scripts.sh b/src/yapf/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/yapf/library_scripts.sh +++ b/src/yapf/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/youtube-dl/devcontainer-feature.json b/src/youtube-dl/devcontainer-feature.json index f3ebd4348..07c47b60e 100644 --- a/src/youtube-dl/devcontainer-feature.json +++ b/src/youtube-dl/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "youtube-dl", - "version": "2.0.16", + "version": "2.0.17", "name": "youtube-dl (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/youtube-dl", "description": "youtube-dl is a command-line program to download videos from YouTube.com and other video sites.", diff --git a/src/youtube-dl/install.sh b/src/youtube-dl/install.sh index e414bf4d1..a5c9e821d 100755 --- a/src/youtube-dl/install.sh +++ b/src/youtube-dl/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='youtube-dl' --option version="$VERSION" diff --git a/src/youtube-dl/library_scripts.sh b/src/youtube-dl/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/youtube-dl/library_scripts.sh +++ b/src/youtube-dl/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location } diff --git a/src/yt-dlp/devcontainer-feature.json b/src/yt-dlp/devcontainer-feature.json index d50ff7ce1..0c8c9759a 100644 --- a/src/yt-dlp/devcontainer-feature.json +++ b/src/yt-dlp/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "yt-dlp", - "version": "2.0.16", + "version": "2.0.17", "name": "yt-dlp (via pipx)", "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/yt-dlp", "description": "yt-dlp is a youtube-dl fork with additional features and fixes.", diff --git a/src/yt-dlp/install.sh b/src/yt-dlp/install.sh index 6e1123faf..e1ea4d8c1 100755 --- a/src/yt-dlp/install.sh +++ b/src/yt-dlp/install.sh @@ -1,21 +1,20 @@ -#!/bin/bash -i set -e -source ./library_scripts.sh +. ./library_scripts.sh # nanolayer is a cli utility which keeps container layers as small as possible # source code: https://github.com/devcontainers-contrib/nanolayer # `ensure_nanolayer` is a bash function that will find any existing nanolayer installations, # and if missing - will download a temporary copy that automatically get deleted at the end # of the script -ensure_nanolayer nanolayer_location "v0.4.45" +ensure_nanolayer nanolayer_location "v0.5.0" $nanolayer_location \ install \ devcontainer-feature \ - "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.6" \ + "ghcr.io/devcontainers-contrib/features/pipx-package:1.1.7" \ --option package='yt-dlp' --option version="$VERSION" diff --git a/src/yt-dlp/library_scripts.sh b/src/yt-dlp/library_scripts.sh index 8f9bd9a0e..0d7f34d4b 100644 --- a/src/yt-dlp/library_scripts.sh +++ b/src/yt-dlp/library_scripts.sh @@ -1,4 +1,3 @@ -#!/bin/bash -i clean_download() { @@ -10,13 +9,13 @@ clean_download() { # The above steps will minimize the leftovers being created while installing the downloader # Supported distros: # debian/ubuntu/alpine - + url=$1 output_location=$2 tempdir=$(mktemp -d) downloader_installed="" - function _apt_get_install() { + _apt_get_install() { tempdir=$1 # copy current state of apt list - in order to revert back later (minimize contianer layer size) @@ -25,7 +24,7 @@ clean_download() { apt-get -y install --no-install-recommends wget ca-certificates } - function _apt_get_cleanup() { + _apt_get_cleanup() { tempdir=$1 echo "removing wget" @@ -36,7 +35,7 @@ clean_download() { rm -r /var/lib/apt/lists && mv $tempdir/lists /var/lib/apt/lists } - function _apk_install() { + _apk_install() { tempdir=$1 # copy current state of apk cache - in order to revert back later (minimize contianer layer size) cp -p -R /var/cache/apk $tempdir @@ -44,7 +43,7 @@ clean_download() { apk add --no-cache wget } - function _apk_cleanup() { + _apk_cleanup() { tempdir=$1 echo "removing wget" @@ -100,45 +99,39 @@ ensure_nanolayer() { local variable_name=$1 local required_version=$2 - # normalize version - if ! [[ $required_version == v* ]]; then - required_version=v$required_version - fi - local nanolayer_location="" + local __nanolayer_location="" # If possible - try to use an already installed nanolayer - if [[ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]]; then - if [[ -z "${NANOLAYER_CLI_LOCATION}" ]]; then + if [ -z "${NANOLAYER_FORCE_CLI_INSTALLATION}" ]; then + if [ -z "${NANOLAYER_CLI_LOCATION}" ]; then if type nanolayer >/dev/null 2>&1; then echo "Found a pre-existing nanolayer in PATH" - nanolayer_location=nanolayer + __nanolayer_location=nanolayer fi elif [ -f "${NANOLAYER_CLI_LOCATION}" ] && [ -x "${NANOLAYER_CLI_LOCATION}" ] ; then - nanolayer_location=${NANOLAYER_CLI_LOCATION} - echo "Found a pre-existing nanolayer which were given in env variable: $nanolayer_location" + __nanolayer_location=${NANOLAYER_CLI_LOCATION} + echo "Found a pre-existing nanolayer which were given in env variable: $__nanolayer_location" fi # make sure its of the required version - if ! [[ -z "${nanolayer_location}" ]]; then + if ! [ -z "${__nanolayer_location}" ]; then local current_version - current_version=$($nanolayer_location --version) - if ! [[ $current_version == v* ]]; then - current_version=v$current_version - fi + current_version=$($__nanolayer_location --version) + if ! [ $current_version == $required_version ]; then echo "skipping usage of pre-existing nanolayer. (required version $required_version does not match existing version $current_version)" - nanolayer_location="" + __nanolayer_location="" fi fi fi # If not previuse installation found, download it temporarly and delete at the end of the script - if [[ -z "${nanolayer_location}" ]]; then + if [ -z "${__nanolayer_location}" ]; then - if [ "$(uname -sm)" == "Linux x86_64" ] || [ "$(uname -sm)" == "Linux aarch64" ]; then + if [ "$(uname -sm)" = 'Linux x86_64' ] || [ "$(uname -sm)" = "Linux aarch64" ]; then tmp_dir=$(mktemp -d -t nanolayer-XXXXXXXXXX) clean_up () { @@ -162,7 +155,7 @@ ensure_nanolayer() { tar xfzv $tmp_dir/$tar_filename -C "$tmp_dir" chmod a+x $tmp_dir/nanolayer - nanolayer_location=$tmp_dir/nanolayer + __nanolayer_location=$tmp_dir/nanolayer else @@ -172,7 +165,7 @@ ensure_nanolayer() { fi # Expose outside the resolved location - declare -g ${variable_name}=$nanolayer_location + export ${variable_name}=$__nanolayer_location }