Skip to content

Commit

Permalink
Add alpine-lazygit feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cirolosapio committed Oct 16, 2024
1 parent a51de0d commit d842b58
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [alpine-git](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-git)
- [alpine-gpg](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-gpg)
- [alpine-jq](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-jq)
- [alpine-lazygit](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-lazygit)
- [alpine-mage2postman](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-mage2postman)
- [alpine-magento-cloud-cli](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-magento-cloud-cli)
- [alpine-n98-magerun2](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-n98-magerun2)
Expand Down
20 changes: 20 additions & 0 deletions src/alpine-lazygit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

# alpine-lazygit (alpine-lazygit)

Installs lazygit on alpine

## Example Usage

```json
"features": {
"ghcr.io/cirolosapio/devcontainers-features/alpine-lazygit:0": {}
}
```





---

_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/cirolosapio/devcontainers-features/blob/main/src/alpine-lazygit/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
10 changes: 10 additions & 0 deletions src/alpine-lazygit/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "alpine-lazygit",
"id": "alpine-lazygit",
"version": "0.0.1",
"description": "Installs lazygit on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-lazygit",
"installsAfter": [
"ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh"
]
}
21 changes: 21 additions & 0 deletions src/alpine-lazygit/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

set -e

echo "Activating feature 'alpine-lazygit'"

apk --no-cache add lazygit

if command -v zsh &> /dev/null; then
if [ -z "$_CONTAINER_USER_HOME" ]; then
if [ -z "$_CONTAINER_USER" ]; then
_CONTAINER_USER_HOME=/root
else
_CONTAINER_USER_HOME=$(getent passwd $_CONTAINER_USER | cut -d: -f6)
fi
fi

echo $'\nalias lg=lazygit' >> $_CONTAINER_USER_HOME/.zshrc
fi

echo 'Done!'

0 comments on commit d842b58

Please sign in to comment.