From d2d449ebdf8929e902b0a86abef829c2a0492f1e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:58:10 +0000 Subject: [PATCH 1/2] Initial plan From 8f999b0b3104f8fa8cce9a671a47cab1e6a5b207 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Mar 2026 16:05:28 +0000 Subject: [PATCH 2/2] Add mosh.org devcontainer feature Co-authored-by: sebst <592313+sebst@users.noreply.github.com> --- .github/workflows/test.yaml | 2 ++ src/mosh.org/devcontainer-feature.json | 7 ++++++ src/mosh.org/install.sh | 35 ++++++++++++++++++++++++++ test/mosh.org/test.sh | 18 +++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 src/mosh.org/devcontainer-feature.json create mode 100755 src/mosh.org/install.sh create mode 100755 test/mosh.org/test.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6b185fa..6276ab1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,6 +24,7 @@ jobs: - deno.com - feature-installer - jj-vcs.dev + - mosh.org - neovim.io - nixos.org - nvidia.com-cuda @@ -68,6 +69,7 @@ jobs: - deno.com - feature-installer - jj-vcs.dev + - mosh.org - neovim.io - nixos.org - nvidia.com-cuda diff --git a/src/mosh.org/devcontainer-feature.json b/src/mosh.org/devcontainer-feature.json new file mode 100644 index 0000000..1715aed --- /dev/null +++ b/src/mosh.org/devcontainer-feature.json @@ -0,0 +1,7 @@ +{ + "name": "mosh.org", + "id": "mosh.org", + "version": "1.0.0", + "description": "Install \"mosh\" (mobile shell) binary", + "documentationURL": "https://github.com/devcontainer-community/devcontainer-features/tree/main/src/mosh.org" +} diff --git a/src/mosh.org/install.sh b/src/mosh.org/install.sh new file mode 100755 index 0000000..b87a7cd --- /dev/null +++ b/src/mosh.org/install.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -o errexit +set -o pipefail +set -o noclobber +set -o nounset +set -o allexport +readonly name="mosh" +apt_get_update() { + if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then + echo "Running apt-get update..." + apt-get update -y + fi +} +apt_get_checkinstall() { + if ! dpkg -s "$@" >/dev/null 2>&1; then + apt_get_update + DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends --no-install-suggests --option 'Debug::pkgProblemResolver=true' --option 'Debug::pkgAcquire::Worker=1' "$@" + fi +} +apt_get_cleanup() { + apt-get clean + rm -rf /var/lib/apt/lists/* +} +echo_banner() { + local text="$1" + echo -e "\e[1m\e[97m\e[41m$text\e[0m" +} +install() { + apt_get_checkinstall mosh + apt_get_cleanup +} +echo_banner "devcontainer.community" +echo "Installing $name..." +install "$@" +echo "(*) Done!" diff --git a/test/mosh.org/test.sh b/test/mosh.org/test.sh new file mode 100755 index 0000000..efbd835 --- /dev/null +++ b/test/mosh.org/test.sh @@ -0,0 +1,18 @@ +#!/bin/bash + + +set -e + +# Optional: Import test library bundled with the devcontainer CLI +# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib +# Provides the 'check' and 'reportResults' commands. +source dev-container-features-test-lib + +# Feature-specific tests +# The 'check' command comes from the dev-container-features-test-lib. Syntax is... +# check