php tools misc

This commit is contained in:
Anthony Axenov 2024-07-31 23:35:38 +08:00
parent bf970f58cd
commit 4014f83402
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
6 changed files with 18 additions and 18 deletions

View File

@ -16,11 +16,11 @@ installed() {
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || {
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
$NEWPATH
echo "$NEWPATH" >> "${HOME}/.profile"
echo "$NEWPATH" >> "$HOME/.profile"
}
source "${HOME}/.profile"
source "$HOME/.profile"
composer global require vimeo/psalm --dev

View File

@ -16,11 +16,11 @@ installed() {
! installed 'make' && sudo apt install -y make
! installed 'wget' && sudo apt install -y wget
[ -d "${HOME}/install/php-spx" ] || mkdir -p "${HOME}/install/php-spx"
[ -d "$HOME/install/php-spx" ] || mkdir -p "$HOME/install/php-spx"
wget https://github.com/NoiseByNorthwest/php-spx/archive/refs/heads/release/latest.zip -O /tmp/php-spx.zip \
&& unzip -oq /tmp/php-spx.zip -d "${HOME}/install/php-spx" \
&& unzip -oq /tmp/php-spx.zip -d "$HOME/install/php-spx" \
&& rm /tmp/php-spx.zip \
&& cd "${HOME}/install/php-spx/php-spx-release-latest" \
&& cd "$HOME/install/php-spx/php-spx-release-latest" \
&& phpize \
&& ./configure \
&& make \

View File

@ -16,11 +16,11 @@ installed() {
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || {
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
$NEWPATH
echo "$NEWPATH" >> "${HOME}/.profile"
echo "$NEWPATH" >> "$HOME/.profile"
}
source "${HOME}/.profile"
source "$HOME/.profile"
composer global require squizlabs/php_codesniffer --dev
composer global require friendsofphp/php-cs-fixer --dev

View File

@ -16,11 +16,11 @@ installed() {
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || {
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
$NEWPATH
echo "$NEWPATH" >> "${HOME}/.profile"
echo "$NEWPATH" >> "$HOME/.profile"
}
source "${HOME}/.profile"
source "$HOME/.profile"
composer global require phpmd/phpmd --dev

View File

@ -16,11 +16,11 @@ installed() {
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || {
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
$NEWPATH
echo "$NEWPATH" >> "${HOME}/.profile"
echo "$NEWPATH" >> "$HOME/.profile"
}
source "${HOME}/.profile"
source "$HOME/.profile"
composer global require phpstan/phpstan --dev

View File

@ -16,11 +16,11 @@ installed() {
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || {
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
$NEWPATH
echo "$NEWPATH" >> "${HOME}/.profile"
echo "$NEWPATH" >> "$HOME/.profile"
}
source "${HOME}/.profile"
source "$HOME/.profile"
composer global require phpunit/phpunit --dev