This commit is contained in:
Anthony Axenov 2022-12-10 21:59:01 +08:00
parent 5abc1c9434
commit 3a853564c1
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
4 changed files with 58 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# Autogenerated at 09.10.2022 12:57 using ./gen-makefile
# Autogenerated at 10.12.2022 21:58 using ./gen-makefile
.DEFAULT_GOAL := help
#===============================================
@ -22,6 +22,9 @@ omz: zsh omz-clean omz-fancy
chsh -s /usr/bin/zsh
@exec zsh
# [PACK] php + composer + phpunit + psalm + phpcs + php-cs-fixer
phptools: php composer-clean php-tools-only
#===============================================
# Scripts listed in ./install
#===============================================
@ -98,7 +101,7 @@ kde-portal:
libreoffice:
@./install/libreoffice
# Install lite-xl v2.0.5 (draft)
# Install lite-xl
lite-xl:
@./install/lite-xl
@ -138,6 +141,10 @@ pgsql:
php:
@./install/php
# Install phpunit + psalm + phpcs + php-cs-fixer
php-tools-only:
@./install/php-tools-only
# Install postman (latest)
postman:
@./install/postman
@ -174,7 +181,7 @@ vivaldi:
wine:
@./install/wine
# Install youtube-dl + ytdlcue
# Install youtube-dl
youtube-dl:
@./install/youtube-dl
@ -206,6 +213,10 @@ zsh:
/docker:
@./uninstall/docker
# Uninstall lite-xl
/lite-xl:
@./uninstall/lite-xl
# Uninstall omz
/omz:
@./uninstall/omz

View File

@ -12,7 +12,7 @@ installed() {
command -v "$1" >/dev/null 2>&1
}
!installed "php" && echo "WARNING: You need to have php installed"
! installed "php" && echo "WARNING: You need php to be installed"
if installed "composer"; then
echo "WARNING: Removing current composer to install its actual version"

41
install/php-tools-only Executable file
View File

@ -0,0 +1,41 @@
#!/bin/bash
##makedesc: Install phpunit + psalm + phpcs + php-cs-fixer
echo
echo "==============================================="
echo "Installing phpunit + psalm + phpcs + php-cs-fixer..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
! installed "php" && echo "ERROR: You need php to be installed" && exit 1
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
composer global require phpunit/phpunit --dev
composer global require phpmd/phpmd --dev
composer global require squizlabs/php_codesniffer --dev
composer global require friendsofphp/php-cs-fixer --dev
composer global require vimeo/psalm --dev
composer global require phpstan/phpstan --dev
# composer global require phpunit/dbunit
# composer global require phing/phing
# composer global require phpdocumentor/phpdocumentor
# composer global require sebastian/phpcpd
# composer global require phploc/phploc
export PATH="$(composer config -g home)/vendor/bin:${PATH}"
echo 'export PATH="$(composer config -g home)/vendor/bin:${PATH}"' >> "${HOME}/.profile"
phpunit --version
phpmd --version
phpcs --version # phpcbf --version
php-cs-fixer --version
psalm --version
phpstan --version
echo
echo "Finish!"
echo

2
packs/phptools Normal file
View File

@ -0,0 +1,2 @@
# [PACK] php + composer + phpunit + psalm + phpcs + php-cs-fixer
phptools: php composer-clean php-tools-only