-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
abe1bb9
commit f86155f
Showing
4 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "alpine-n98-magerun", | ||
"id": "alpine-n98-magerun", | ||
"version": "0.0.2", | ||
"description": "Installs n98-magerun on alpine", | ||
"documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-n98-magerun", | ||
"options": { | ||
"version": { | ||
"type": "string", | ||
"default": "7.1.0", | ||
"description": "Version of n98-magerun to install", | ||
"proposals": [ | ||
"7.1.0", | ||
"6.1.1" | ||
] | ||
}, | ||
"initStarship": { | ||
"type": "boolean", | ||
"default": true, | ||
"description": "Init zsh" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
echo "Activating feature 'alpine-n98-magerun2'" | ||
|
||
VERSION="${VERSION:-7.1.0}" | ||
|
||
wget -q https://files.magerun.net/n98-magerun2-${VERSION}.phar -O /usr/local/bin/n98-magerun2.phar | ||
# shasum -a256 n98-magerun2.phar | ||
chmod +x /usr/local/bin/n98-magerun2.phar | ||
|
||
if [[ $INITZSH == "true" ]]; then | ||
# 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 | ||
|
||
# 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 | ||
fi | ||
|
||
echo 'Done!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters