diff --git a/install/composer b/install/composer index 13204a4..c1514bd 100755 --- a/install/composer +++ b/install/composer @@ -25,8 +25,8 @@ if installed "composer"; then rm $HOME/.local/bin/composer fi -mkdir -p $HOME/install && cd $HOME/install -# mkdir -p $HOME/.local/bin +mkdir -p $HOME/install $HOME/.local/bin +cd $HOME/install EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" # php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" @@ -41,12 +41,13 @@ php composer-setup.php --quiet mv -f $HOME/install/composer.phar $HOME/.local/bin/composer cd - >/dev/null -COMPOSER_GLOBAL_HOME="$(composer config -g home)" +COMPOSER_GLOBAL_HOME="$($HOME/.local/bin/composer config -g home)" NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\"" cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || { $NEWPATH echo "$NEWPATH" >> "${HOME}/.profile" } +source "${HOME}/.profile" echo echo "Finish!" diff --git a/install/php b/install/php index d6701bd..1e910b0 100755 --- a/install/php +++ b/install/php @@ -16,12 +16,10 @@ sudo apt install -y --autoremove \ php${PHPVER}-cli \ php${PHPVER}-common \ php${PHPVER}-curl \ - # php${PHPVER}-dba \ php${PHPVER}-dev \ php${PHPVER}-dom \ php${PHPVER}-gd \ php${PHPVER}-intl \ - # php${PHPVER}-ldap \ php${PHPVER}-mbstring \ php${PHPVER}-mysql \ php${PHPVER}-opcache \ @@ -31,7 +29,10 @@ sudo apt install -y --autoremove \ php${PHPVER}-xdebug \ php${PHPVER}-xml \ php${PHPVER}-xmlrpc \ - # php${PHPVER}-xsl \ php${PHPVER}-zip + # php${PHPVER}-ldap \ + # php${PHPVER}-dba \ + # php${PHPVER}-xsl \ + php -v diff --git a/install/php-psalm b/install/php-psalm index 2891041..862b6f2 100755 --- a/install/php-psalm +++ b/install/php-psalm @@ -20,6 +20,7 @@ cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || { $NEWPATH echo "$NEWPATH" >> "${HOME}/.profile" } +source "${HOME}/.profile" composer global require vimeo/psalm --dev diff --git a/install/phpcs b/install/phpcs index d429411..5d11145 100755 --- a/install/phpcs +++ b/install/phpcs @@ -20,6 +20,7 @@ cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || { $NEWPATH echo "$NEWPATH" >> "${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 c589ecb..92bf1f4 100755 --- a/install/phpmd +++ b/install/phpmd @@ -20,6 +20,7 @@ cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || { $NEWPATH echo "$NEWPATH" >> "${HOME}/.profile" } +source "${HOME}/.profile" composer global require phpmd/phpmd --dev diff --git a/install/phpstan b/install/phpstan index 835a314..2aa4ac9 100755 --- a/install/phpstan +++ b/install/phpstan @@ -20,6 +20,7 @@ cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || { $NEWPATH echo "$NEWPATH" >> "${HOME}/.profile" } +source "${HOME}/.profile" composer global require phpstan/phpstan --dev diff --git a/install/phpunit b/install/phpunit index 525c705..cd4bcbf 100755 --- a/install/phpunit +++ b/install/phpunit @@ -12,7 +12,7 @@ installed() { } ! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1 -! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2 +! installed "composer" && echo "ERROR: You rneed composer to be installed" && exit 2 COMPOSER_GLOBAL_HOME="$(composer config -g home)" NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\"" @@ -20,6 +20,7 @@ cat "${HOME}/.profile" | grep -qoh "$NEWPATH" || { $NEWPATH echo "$NEWPATH" >> "${HOME}/.profile" } +source "${HOME}/.profile" composer global require phpunit/phpunit --dev