From 4014f834028c87e716a396acffe166e78a29b3f2 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Wed, 31 Jul 2024 23:35:38 +0800 Subject: [PATCH] php tools misc --- install/php-psalm | 6 +++--- install/php-spx | 6 +++--- install/phpcs | 6 +++--- install/phpmd | 6 +++--- install/phpstan | 6 +++--- install/phpunit | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/install/php-psalm b/install/php-psalm index 548e374..7fee67c 100755 --- a/install/php-psalm +++ b/install/php-psalm @@ -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 diff --git a/install/php-spx b/install/php-spx index 4e8351b..edf5814 100755 --- a/install/php-spx +++ b/install/php-spx @@ -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 \ diff --git a/install/phpcs b/install/phpcs index 489c8b5..163bc6a 100755 --- a/install/phpcs +++ b/install/phpcs @@ -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 diff --git a/install/phpmd b/install/phpmd index beffa52..c1124d8 100755 --- a/install/phpmd +++ b/install/phpmd @@ -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 diff --git a/install/phpstan b/install/phpstan index 64bf973..ba2ac3f 100755 --- a/install/phpstan +++ b/install/phpstan @@ -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 diff --git a/install/phpunit b/install/phpunit index ce3ca45..584df44 100755 --- a/install/phpunit +++ b/install/phpunit @@ -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