Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cirolosapio committed Oct 2, 2023
1 parent e5fd242 commit b937bea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
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.5",
"version": "0.0.6",
"description": "Installs ohmyzsh on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-ohmyzsh",
"options": {
Expand Down
13 changes: 6 additions & 7 deletions src/alpine-ohmyzsh/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ apk --no-cache add git curl zsh

CURRENT_USER=$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)
echo "Acting as $CURRENT_USER"
su $CURRENT_USER

curl -s https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sh -s
su -c "curl -s https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sh -s" $CURRENT_USER

git clone https://github.com/supercrabtree/k ~/.oh-my-zsh/custom/plugins/k
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
sed -i 's/plugins=(git)/plugins=(\n git\n sudo\n k\n zsh-autosuggestions\n zsh-syntax-highlighting\n)/' ~/.zshrc
git clone https://github.com/supercrabtree/k $_CONTAINER_USER_HOME/.oh-my-zsh/custom/plugins/k
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 sudo\n k\n zsh-autosuggestions\n zsh-syntax-highlighting\n)/' $_CONTAINER_USER_HOME/.zshrc

if [[ $INITSTARSHIP == "true" ]]; then
echo $'\neval "$(starship init zsh)"' >> ~/.zshrc
echo $'\neval "$(starship init zsh)"' >> $_CONTAINER_USER_HOME/.zshrc
fi

echo 'Done!'

0 comments on commit b937bea

Please sign in to comment.