Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cirolosapio committed Apr 5, 2024
1 parent 97656d2 commit d85a269
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
7 changes: 7 additions & 0 deletions src/alpine-gh-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "alpine-gh-cli",
"id": "alpine-gh-cli",
"version": "0.0.1",
"description": "Installs github cli on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-gh-cli"
}
9 changes: 9 additions & 0 deletions src/alpine-gh-cli/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -e

echo "Activating feature 'alpine-gh-cli'"

apk --no-cache add github-cli

echo 'Done!'
2 changes: 1 addition & 1 deletion src/alpine-gh-copilot-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alpine-gh-copilot-cli",
"id": "alpine-gh-copilot-cli",
"version": "0.0.8",
"version": "0.0.9",
"description": "Installs Github Copilot CLI on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-gh-copilot-cli",
"installsAfter": [
Expand Down
4 changes: 2 additions & 2 deletions src/alpine-gh-copilot-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ if [[ $INITALIAS == "true" ]]; then
echo "CURRENT_USER is $CURRENT_USER"

if [[ -z $CURRENT_USER ]]; then
echo 'eval "$(github-copilot-cli alias -- "$0")"' >> $_CONTAINER_USER_HOME/.zshrc
echo 'eval "$(github-copilot-cli alias -- /bin/zsh)"' >> $_CONTAINER_USER_HOME/.zshrc
else
su -c "echo 'eval \"$(github-copilot-cli alias -- \"$0\")\"' >> $_CONTAINER_USER_HOME/.zshrc" $CURRENT_USER
su -c "echo 'eval \"$(github-copilot-cli alias -- /bin/zsh)\"' >> $_CONTAINER_USER_HOME/.zshrc" $CURRENT_USER
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion src/alpine-ohmyzsh/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alpine-ohmyzsh",
"id": "alpine-ohmyzsh",
"version": "0.0.15",
"version": "0.0.16",
"description": "Installs ohmyzsh on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-ohmyzsh",
"installsAfter": [
Expand Down
4 changes: 0 additions & 4 deletions src/alpine-ohmyzsh/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ apk --no-cache add git zsh
CURRENT_USER=$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)
su -c "wget -qO- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sh -s" $CURRENT_USER

if [[ $CURRENT_USER != "root" ]] && [[ $_CONTAINER_USER_HOME == "/root" ]]; then
_CONTAINER_USER_HOME="/home/$CURRENT_USER"
fi

git clone https://github.com/zsh-users/zsh-autosuggestions $_CONTAINER_USER_HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting $_CONTAINER_USER_HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
sed -i 's/plugins=(git)/plugins=(\n git\n zsh-autosuggestions\n zsh-syntax-highlighting\n)/' $_CONTAINER_USER_HOME/.zshrc
Expand Down

0 comments on commit d85a269

Please sign in to comment.