summaryrefslogtreecommitdiff
path: root/features/src/common-utils/install.sh
diff options
context:
space:
mode:
authorNeonXP <i@neonxp.ru>2024-01-28 20:43:11 +0300
committerNeonXP <i@neonxp.ru>2024-01-28 22:07:35 +0300
commit11412b2e720f754900b39d195f33af39ed11d085 (patch)
tree96d7e561f21809aead3c0f25034f083f46ef064c /features/src/common-utils/install.sh
parent6c00916212073678bbeb3bdde3f121c4efad707a (diff)
Go теперь фича над базовым образомHEADmaster
Diffstat (limited to 'features/src/common-utils/install.sh')
-rwxr-xr-xfeatures/src/common-utils/install.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/features/src/common-utils/install.sh b/features/src/common-utils/install.sh
new file mode 100755
index 0000000..8f1ece4
--- /dev/null
+++ b/features/src/common-utils/install.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#-------------------------------------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See https://github.com/devcontainers/features/blob/main/LICENSE for license information.
+#-------------------------------------------------------------------------------------------------------------------------
+#
+# Docs: https://github.com/devcontainers/features/tree/main/src/common-utils
+# Maintainer: The Dev Container spec maintainers
+
+set -e
+
+INSTALL_ZSH="${INSTALLZSH:-"true"}"
+CONFIGURE_ZSH_AS_DEFAULT_SHELL="${CONFIGUREZSHASDEFAULTSHELL:-"false"}"
+INSTALL_OH_MY_ZSH="${INSTALLOHMYZSH:-"true"}"
+INSTALL_OH_MY_ZSH_CONFIG="${INSTALLOHMYZSHCONFIG:-"true"}"
+UPGRADE_PACKAGES="${UPGRADEPACKAGES:-"true"}"
+USERNAME="${USERNAME:-"automatic"}"
+USER_UID="${UID:-"automatic"}"
+USER_GID="${GID:-"automatic"}"
+ADD_NON_FREE_PACKAGES="${NONFREEPACKAGES:-"false"}"
+
+MARKER_FILE="/usr/local/etc/vscode-dev-containers/common"
+
+if [ "$(id -u)" -ne 0 ]; then
+ echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
+ exit 1
+fi
+
+# If we're using Alpine, install bash before executing
+. /etc/os-release
+if [ "${ID}" = "alpine" ]; then
+ apk add --no-cache bash
+fi
+
+exec /bin/bash "$(dirname $0)/main.sh" "$@"
+exit $?