From 0aac460d6370272e75651d7da5e41482df8d783c Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Sun, 11 Dec 2022 14:48:52 +0800 Subject: [PATCH] makefile misc + generator --- Makefile | 100 +++++++++++++++++++++++++++++++++++---------------- gen-makefile | 30 ++++++++-------- 2 files changed, 86 insertions(+), 44 deletions(-) diff --git a/Makefile b/Makefile index 5668e0e..f365281 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,6 @@ -# Autogenerated at 30.11.2022 17:50 using ./gen-makefile +# Autogenerated at 11.12.2022 14:30 using ./gen-makefile .DEFAULT_GOAL := help -#=============================================== -# Scripts listed in ./packs -#=============================================== - -# [PACK] php + composer -composer: php composer-clean - -# [TODO] [PACK] qt5 + flameshot from source -flameshot: qt5 flameshot-build - -# [PACK] Apache + php + mariadb -lamp: apache php mariadb - -# [PACK] OBS Studio + droidcam-obs -obs: obs-studio droidcam-obs - -# [PACK] zsh + omz + powerline10k + MesloLGS font -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 #=============================================== @@ -46,8 +22,8 @@ chrome: @./install/chrome # Install composer (latest) -composer-clean: - @./install/composer-clean +composer: + @./install/composer # Install docker (latest) + docker-compose (latest) + ppa docker: @@ -145,9 +121,29 @@ pgsql: php: @./install/php -# Install phpunit + psalm + phpcs + php-cs-fixer -php-tools-only: - @./install/php-tools-only +# Install phpcs + php-cs-fixer +phpcs: + @./install/phpcs + +# Install phpmd +phpmd: + @./install/phpmd + +# Install psalm +php-psalm: + @./install/php-psalm + +# Install php-spx +php-spx: + @./install/php-spx + +# Install phpstan +phpstan: + @./install/phpstan + +# Install phpunit +phpunit: + @./install/phpunit # Install postman (latest) postman: @@ -201,6 +197,50 @@ zint: zsh: @./install/zsh + +#=============================================== +# Scripts listed in ./packs +#=============================================== + +# [TODO] [PACK] Install qt5 + flameshot from source +flameshot: + qt5 + flameshot-build + +# [PACK] Install apache + php + mariadb +lamp: + apache + php-stack + mariadb + +# [PACK] Install OBS Studio + droidcam-obs +obs: + obs-studio + droidcam-obs + +# [PACK] Install zsh + omz + powerline10k + MesloLGS font +omz: + zsh + omz-clean + omz-fancy + chsh -s /usr/bin/zsh + @exec zsh + +# [PACK] Install full php stack with tooling +phptools: + php + php-tools + +# [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, php-spx, phpmd) +php-stack: + composer + php-psalm + php-spx + phpcs + phpmd + phpstan + phpunit + #=============================================== # Scripts listed in ./upgrade #=============================================== diff --git a/gen-makefile b/gen-makefile index 163f333..c362165 100755 --- a/gen-makefile +++ b/gen-makefile @@ -1,24 +1,12 @@ #!/bin/bash -mv Makefile Makefile.bak +[ -f Makefile ] && mv Makefile Makefile.bak CHR_UPGRADE='^' CHR_UNINSTALL='/' -cat << EOF >> Makefile +cat << EOF > Makefile # Autogenerated at $(date +'%d.%m.%Y %H:%M') using ${BASH_SOURCE[0]} .DEFAULT_GOAL := help -#=============================================== -# Scripts listed in ./packs -#=============================================== - -EOF - -for file in ./packs/*; do - cat "$file" >> Makefile - echo >> Makefile -done; - -cat << EOF >> Makefile #=============================================== # Scripts listed in ./install #=============================================== @@ -33,6 +21,20 @@ for file in ./install/*; do echo -e "# ${desc}\n${name}:\n\t@${file}\n" >> Makefile done; +cat << EOF >> Makefile + +#=============================================== +# Scripts listed in ./packs +#=============================================== + +EOF + +for file in ./packs/*; do + cat "$file" >> Makefile + echo >> Makefile +done; + + cat << EOF >> Makefile #=============================================== # Scripts listed in ./upgrade