aboutsummaryrefslogtreecommitdiff
path: root/v1/install.sh
diff options
context:
space:
mode:
authorJosh Spicer <joshspicer@github.com>2022-08-03 21:09:28 +0300
committerGitHub <noreply@github.com>2022-08-03 21:09:28 +0300
commit145f26f8b27ed61667c759d3eebad71778773d78 (patch)
tree26d22d9c36943847bc1393eba4c1ce025238328d /v1/install.sh
parent73db1be5838cc7b71e083819cb50c25b210a6bdc (diff)
remove unused dirs (#76)
Diffstat (limited to 'v1/install.sh')
-rwxr-xr-xv1/install.sh62
1 files changed, 0 insertions, 62 deletions
diff --git a/v1/install.sh b/v1/install.sh
deleted file mode 100755
index f8f23cd..0000000
--- a/v1/install.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env bash
-
-# Support 'v1' dev container feature installation
-# that require a root 'install.sh' script.
-
-set -e
-cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-
-# Verify we're on a supported OS
-. /etc/os-release
-if [ "${ID}" != "debian" ] && [ "${ID_LIKE}" != "debian" ]; then
-cat << EOF
-
-*********** Unsupported operating system "${ID}" detected ***********
-
-Features support currently requires a Debian/Ubuntu-based image. Update your
-image or Dockerfile FROM statement to start with a supported OS. For example:
-mcr.microsoft.com/vscode/devcontainers/base:ubuntu
-
-Aborting build...
-
-EOF
- exit 2
-fi
-
-set -a
-. ./devcontainer-features.env
-set +a
-
-chmod +x *.sh
-
-# Execute option scripts if correct environment variable is set to "true"
-feature_marker_path="/usr/local/etc/vscode-dev-containers/features"
-mkdir -p "${feature_marker_path}"
-while IFS= read -r feature_line; do
- # Extract the env var part of the line
- feature_var_name="${feature_line%%=*}"
- if [ ! -z "${!feature_var_name}" ]; then
- # If a value is set for the env var, execute the script
- feature_script_and_args="${feature_line##*=}"
- feature_script_and_args="${feature_script_and_args%\"}"
- script_command="$(eval echo "${feature_script_and_args#\"}")"
- echo "(*) Script: ${script_command}"
-
- # Check if script with same args has already been run
- feature_marker="${feature_marker_path}/${feature_var_name}";
- if [ -e "${feature_marker}" ] && [ "${script_command}" = "$(cat ${feature_marker})" ]; then
- echo "(*) Skipping. Script already run with same arguments."
- else
- # Execute script and create a marker with the script args
- script_name="$(echo $script_command | cut -d' ' -f1)"
- chmod +x ${script_name}
- ./${script_command}
- echo "${script_command}" > "${feature_marker}"
- fi
- fi
-done < ./feature-scripts.env
-
-# Clean up
-apt-get autoremove -y
-apt-get clean -y
-rm -rf /var/lib/apt/lists/*