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 892fe7e commit dcf9a5a
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/alpine-bat/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alpine-bat",
"id": "alpine-bat",
"version": "0.0.1",
"version": "0.0.2",
"description": "Installs bat on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-bat"
}
5 changes: 4 additions & 1 deletion src/alpine-bat/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ set -e
echo "Activating feature 'alpine-bat'"

apk --no-cache add bat
echo "alias cat='bat'" >> $_CONTAINER_USER_HOME/.profile

su $_CONTAINER_USER_NAME

echo "alias cat='bat'" >> ~/.profile

echo 'Done!'
2 changes: 1 addition & 1 deletion src/alpine-n98-magerun/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alpine-n98-magerun",
"id": "alpine-n98-magerun",
"version": "0.0.2",
"version": "0.0.3",
"description": "Installs n98-magerun on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-n98-magerun",
"options": {
Expand Down
24 changes: 13 additions & 11 deletions src/alpine-n98-magerun/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ wget -q https://files.magerun.net/n98-magerun2-${VERSION}.phar -O /usr/local/bin
chmod +x /usr/local/bin/n98-magerun2.phar

if [[ $INITZSH == "true" ]]; then
su $_CONTAINER_USER_NAME

# ZSH PLUGIN
mkdir -p $_CONTAINER_USER_HOME/.oh-my-zsh/custom/plugins/n98-magerun2/
wget -q https://raw.githubusercontent.com/netz98/n98-magerun2/develop/res/autocompletion/zsh/n98-magerun2.plugin.zsh -O $_CONTAINER_USER_HOME/.oh-my-zsh/custom/plugins/n98-magerun2/n98-magerun2.plugin.zsh
sed -i 's/^plugins=(/plugins=(\n n98-magerun2/g' $_CONTAINER_USER_HOME/.zshrc
mkdir -p ~/.oh-my-zsh/custom/plugins/n98-magerun2/
wget -q https://raw.githubusercontent.com/netz98/n98-magerun2/develop/res/autocompletion/zsh/n98-magerun2.plugin.zsh -O ~/.oh-my-zsh/custom/plugins/n98-magerun2/n98-magerun2.plugin.zsh
sed -i 's/^plugins=(/plugins=(\n n98-magerun2/g' ~/.zshrc

# ZSH ALIAS
echo $'alias m=bin/magento' >> $_CONTAINER_USER_HOME/.profile
echo $'alias n=n98-magerun2.phar' >> $_CONTAINER_USER_HOME/.profile
echo $'alias sup="m s:up"' >> $_CONTAINER_USER_HOME/.profile
echo $'alias sdc="m s:d:c"' >> $_CONTAINER_USER_HOME/.profile
echo $'alias cf="n c:f"' >> $_CONTAINER_USER_HOME/.profile
echo $'alias reindex="n i:rei"' >> $_CONTAINER_USER_HOME/.profile
echo $'alias refresh=my/shs/refresh.sh' >> $_CONTAINER_USER_HOME/.profile
echo $'alias catalog="n dev:urn-catalog:generate .vscode/catalog_tmp.xml"' >> $_CONTAINER_USER_HOME/.profile
echo $'alias m=bin/magento' >> ~/.profile
echo $'alias n=n98-magerun2.phar' >> ~/.profile
echo $'alias sup="m s:up"' >> ~/.profile
echo $'alias sdc="m s:d:c"' >> ~/.profile
echo $'alias cf="n c:f"' >> ~/.profile
echo $'alias reindex="n i:rei"' >> ~/.profile
echo $'alias refresh=my/shs/refresh.sh' >> ~/.profile
echo $'alias catalog="n dev:urn-catalog:generate .vscode/catalog_tmp.xml"' >> ~/.profile
fi

echo 'Done!'
2 changes: 1 addition & 1 deletion src/alpine-navi/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alpine-navi",
"id": "alpine-navi",
"version": "0.0.1",
"version": "0.0.2",
"description": "Installs navi on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-navi",
"options": {
Expand Down
5 changes: 3 additions & 2 deletions src/alpine-navi/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ 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
su $_CONTAINER_USER_NAME

echo $'\neval "$(navi widget zsh)"' >> ~/.zshrc
fi

echo 'Done!'
2 changes: 1 addition & 1 deletion src/alpine-nushell/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alpine-nushell",
"id": "alpine-nushell",
"version": "0.0.2",
"version": "0.0.3",
"description": "Installs nushell on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-nushell",
"options": {
Expand Down
12 changes: 7 additions & 5 deletions src/alpine-nushell/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ echo "Activating feature 'alpine-nushell'"

apk --no-cache add nushell --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing

mkdir -p $_CONTAINER_USER_HOME/.config/nushell/
wget -q https://raw.githubusercontent.com/nushell/nushell/main/crates/nu-utils/src/sample_config/default_config.nu -O $_CONTAINER_USER_HOME/.config/nushell/config.nu
wget -q https://raw.githubusercontent.com/nushell/nushell/main/crates/nu-utils/src/sample_config/default_env.nu -O $_CONTAINER_USER_HOME/.config/nushell/env.nu
su $_CONTAINER_USER_NAME

mkdir -p ~/.config/nushell/
wget -q https://raw.githubusercontent.com/nushell/nushell/main/crates/nu-utils/src/sample_config/default_config.nu -O ~/.config/nushell/config.nu
wget -q https://raw.githubusercontent.com/nushell/nushell/main/crates/nu-utils/src/sample_config/default_env.nu -O ~/.config/nushell/env.nu

if [[ $INITSTARSHIP == "true" ]]; then
echo $'\nmkdir ~/.cache/starship\nstarship init nu | save -f ~/.cache/starship/init.nu' >> $_CONTAINER_USER_HOME/.config/nushell/env.nu
echo $'\nsource ~/.cache/starship/init.nu' >> $_CONTAINER_USER_HOME/.config/nushell/config.nu
echo $'\nmkdir ~/.cache/starship\nstarship init nu | save -f ~/.cache/starship/init.nu' >> ~/.config/nushell/env.nu
echo $'\nsource ~/.cache/starship/init.nu' >> ~/.config/nushell/config.nu
fi

echo 'Done!'
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.2",
"version": "0.0.3",
"description": "Installs ohmyzsh on alpine",
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-ohmyzsh",
"options": {
Expand Down
14 changes: 8 additions & 6 deletions src/alpine-ohmyzsh/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ set -e
echo "Activating feature 'alpine-ohmyzsh'"

apk --no-cache add git curl zsh

su $_CONTAINER_USER_NAME

curl -s https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sh -s
mv ~/.zshrc $_CONTAINER_USER_HOME/.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
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

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

echo 'Done!'

0 comments on commit dcf9a5a

Please sign in to comment.