From c7b2c7778cfb5f3f1a634156e82173733d560c15 Mon Sep 17 00:00:00 2001 From: cirolosapio Date: Mon, 2 Oct 2023 14:32:38 +0200 Subject: [PATCH] add navi feature --- src/alpine-navi/devcontainer-feature.json | 14 ++++++++++++++ src/alpine-navi/install.sh | 15 +++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/alpine-navi/devcontainer-feature.json create mode 100644 src/alpine-navi/install.sh diff --git a/src/alpine-navi/devcontainer-feature.json b/src/alpine-navi/devcontainer-feature.json new file mode 100644 index 0000000..d009c96 --- /dev/null +++ b/src/alpine-navi/devcontainer-feature.json @@ -0,0 +1,14 @@ +{ + "name": "alpine-navi", + "id": "alpine-navi", + "version": "0.0.1", + "description": "Installs navi on alpine", + "documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-navi", + "options": { + "initZsh": { + "type": "boolean", + "default": true, + "description": "Init zsh configs" + } + } +} \ No newline at end of file diff --git a/src/alpine-navi/install.sh b/src/alpine-navi/install.sh new file mode 100644 index 0000000..1b053ac --- /dev/null +++ b/src/alpine-navi/install.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +echo "Activating feature 'alpine-navi'" + +apk --no-cache add skim +apk --no-cache add navi --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing + +# if $INITZSH is true, then add navi to zshrc +if [[ $INITZSH == "true" ]]; then + echo $'\neval "$(navi widget zsh)"' >> $_CONTAINER_USER_HOME/.zshrc +fi + +echo 'Done!' \ No newline at end of file