Revert "Descriptions parsing improved" (c1150af9) + php tools fixes

master
Anthony Axenov 2022-12-28 15:20:25 +08:00
parent f89b2d946d
commit 90dc1b4d8b
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
13 changed files with 114 additions and 137 deletions

161
Makefile
View File

@ -1,199 +1,199 @@
# Autogenerated at 11.12.2022 14:30 using ./gen-makefile # Autogenerated at 28.12.2022 14:46 using ./gen-makefile
.DEFAULT_GOAL := help .DEFAULT_GOAL := help
#=============================================== #===============================================
# Scripts listed in ./install # Scripts listed in ./install
#=============================================== #===============================================
# Install apache2 (latest) ##apache: Install apache2 (latest)
apache: apache:
@./install/apache @./install/apache
# Install bunch of software from apt ##apt: Install bunch of software from apt
apt: apt:
@./install/apt @./install/apt
# Install Canon Pixma MG2500 + ppa ##canon-mg2500: Install Canon Pixma MG2500 + ppa
canon-mg2500: canon-mg2500:
@./install/canon-mg2500 @./install/canon-mg2500
# Install google chrome (latest) ##chrome: Install google chrome (latest)
chrome: chrome:
@./install/chrome @./install/chrome
# Install composer (latest) ##composer: Install composer (latest)
composer: composer:
@./install/composer @./install/composer
# Install docker (latest) + docker-compose (latest) + ppa ##docker: Install docker (latest) + docker-compose (latest) + ppa
docker: docker:
@./install/docker @./install/docker
# Install dotfiles ##dots: Install dotfiles
dots: dots:
@./install/dots @./install/dots
# Install droidcam v1.8.2 ##droidcam: Install droidcam v1.8.2
droidcam: droidcam:
@./install/droidcam @./install/droidcam
# Install droidcam-obs plugin v1.5.1 ##droidcam-obs: Install droidcam-obs plugin v1.5.1
droidcam-obs: droidcam-obs:
@./install/droidcam-obs @./install/droidcam-obs
# [TODO] Build flameshot from src (latest) ##flameshot-build: [TODO] Build flameshot from src (latest)
flameshot-build: flameshot-build:
@./install/flameshot-build @./install/flameshot-build
# Install git (latest) ##git: Install git (latest)
git: git:
@./install/git @./install/git
# Install golang v1.18.3 ##golang: Install golang v1.18.3
golang: golang:
@./install/golang @./install/golang
# Install grub-customizer (latest) + ppa ##grubc: Install grub-customizer (latest) + ppa
grubc: grubc:
@./install/grubc @./install/grubc
# Install KDE Window AppMenu Applet ##kde-appmenu: Install KDE Window AppMenu Applet
kde-appmenu: kde-appmenu:
@./install/kde-appmenu @./install/kde-appmenu
# Install KDE Backports + ppa ##kde-backports: Install KDE Backports + ppa
kde-backports: kde-backports:
@./install/kde-backports @./install/kde-backports
# Install file templates (KDE) ##kde-file-templates: Install file templates (KDE)
kde-file-templates: kde-file-templates:
@./install/kde-file-templates @./install/kde-file-templates
# Install KDE portal ##kde-portal: Install KDE portal
kde-portal: kde-portal:
@./install/kde-portal @./install/kde-portal
# Install libreoffice ##libreoffice: Install libreoffice
libreoffice: libreoffice:
@./install/libreoffice @./install/libreoffice
# Install lite-xl ##lite-xl: Install lite-xl
lite-xl: lite-xl:
@./install/lite-xl @./install/lite-xl
# Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed) ##mariadb: Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed)
mariadb: mariadb:
@./install/mariadb @./install/mariadb
# Install nodejs + npm via nvm ##nodejs: Install nodejs + npm via nvm
nodejs: nodejs:
@./install/nodejs @./install/nodejs
# Install ntfy (latest) + ppa ##ntfy: Install ntfy (latest) + ppa
ntfy: ntfy:
@./install/ntfy @./install/ntfy
# Install obs-studio (latest snap) ##obs-studio: Install obs-studio (latest snap)
obs-studio: obs-studio:
@./install/obs-studio @./install/obs-studio
# Install omz (latest) ##omz-clean: Install omz (latest)
omz-clean: omz-clean:
@./install/omz-clean @./install/omz-clean
# Install omz fancy (powerline10k + MesloLGS font) ##omz-fancy: Install omz fancy (powerline10k + MesloLGS font)
omz-fancy: omz-fancy:
@./install/omz-fancy @./install/omz-fancy
# Install openvpn v2.5.8 (src) ##openvpn: Install openvpn v2.5.8 (src)
openvpn: openvpn:
@./install/openvpn @./install/openvpn
# Install papirus-icon-theme (latest) ##papirus: Install papirus-icon-theme (latest)
papirus: papirus:
@./install/papirus @./install/papirus
# Install postgresql (latest) and php-pgsql (if php is installed) ##pgsql: Install postgresql (latest) and php-pgsql (if php is installed)
pgsql: pgsql:
@./install/pgsql @./install/pgsql
# Install php v8.1 + ppa ##php: Install php v8.1 + ppa
php: php:
@./install/php @./install/php
# Install phpcs + php-cs-fixer ##phpcs: Install phpcs + php-cs-fixer
phpcs: phpcs:
@./install/phpcs @./install/phpcs
# Install phpmd ##phpmd: Install phpmd
phpmd: phpmd:
@./install/phpmd @./install/phpmd
# Install psalm ##php-psalm: Install psalm
php-psalm: php-psalm:
@./install/php-psalm @./install/php-psalm
# Install php-spx ##php-spx: Install php-spx
php-spx: php-spx:
@./install/php-spx @./install/php-spx
# Install phpstan ##phpstan: Install phpstan
phpstan: phpstan:
@./install/phpstan @./install/phpstan
# Install phpunit ##phpunit: Install phpunit
phpunit: phpunit:
@./install/phpunit @./install/phpunit
# Install postman (latest) ##postman: Install postman (latest)
postman: postman:
@./install/postman @./install/postman
# Install qt5 ##qt5: Install qt5
qt5: qt5:
@./install/qt5 @./install/qt5
# Install rustdesk client v1.1.9 (deb) ##rustdesk: Install rustdesk client v1.1.9 (deb)
rustdesk: rustdesk:
@./install/rustdesk @./install/rustdesk
# Install bunch of software from snap ##snap: Install bunch of software from snap
snap: snap:
@./install/snap @./install/snap
# Install syncthing (latest) + ppa ##syncthing: Install syncthing (latest) + ppa
syncthing: syncthing:
@./install/syncthing @./install/syncthing
# Install telebit (latest) ##telebit: Install telebit (latest)
telebit: telebit:
@./install/telebit @./install/telebit
# Install ulauncher (latest) + ppa ##ulauncher: Install ulauncher (latest) + ppa
ulauncher: ulauncher:
@./install/ulauncher @./install/ulauncher
# Install Vivaldi + ppa ##vivaldi: Install Vivaldi + ppa
vivaldi: vivaldi:
@./install/vivaldi @./install/vivaldi
# Install wine (latest) + ppa (focal) ##wine: Install wine (latest) + ppa (focal)
wine: wine:
@./install/wine @./install/wine
# Install youtube-dl ##youtube-dl: Install youtube-dl
youtube-dl: youtube-dl:
@./install/youtube-dl @./install/youtube-dl
# Install ytdlcue ##ytdlcue: Install ytdlcue
ytdlcue: ytdlcue:
@./install/ytdlcue @./install/ytdlcue
# Install zint (latest) ##zint: Install zint (latest)
zint: zint:
@./install/zint @./install/zint
# Install vanilla zsh ##zsh: Install vanilla zsh
zsh: zsh:
@./install/zsh @./install/zsh
@ -202,44 +202,25 @@ zsh:
# Scripts listed in ./packs # Scripts listed in ./packs
#=============================================== #===============================================
# [TODO] [PACK] Install qt5 + flameshot from source ##flameshot: [TODO] qt5 + flameshot from source
flameshot: flameshot: qt5 flameshot-build
qt5
flameshot-build
# [PACK] Install apache + php + mariadb ##lamp: [PACK] Apache + php + mariadb
lamp: lamp: apache phpstack mariadb
apache
php-stack
mariadb
# [PACK] Install OBS Studio + droidcam-obs ##obs: [PACK] Install OBS Studio + droidcam-obs
obs: obs: obs-studio droidcam-obs
obs-studio
droidcam-obs
# [PACK] Install zsh + omz + powerline10k + MesloLGS font ##omz: [PACK] zsh + omz + powerline10k + MesloLGS font
omz: omz: zsh omz-clean omz-fancy
zsh
omz-clean
omz-fancy
chsh -s /usr/bin/zsh chsh -s /usr/bin/zsh
@exec zsh @exec zsh
# [PACK] Install full php stack with tooling ##phptools: [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, php-spx, phpmd)
phptools: phptools: composer php-psalm php-spx phpcs phpmd phpstan phpunit
php
php-tools
# [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, php-spx, phpmd) ##phpstack: [PACK] Install full php stack with tooling
php-stack: phpstack: php phptools
composer
php-psalm
php-spx
phpcs
phpmd
phpstan
phpunit
#=============================================== #===============================================
# Scripts listed in ./upgrade # Scripts listed in ./upgrade
@ -271,13 +252,23 @@ php-stack:
self: self:
@./gen-makefile @./gen-makefile
help: Makefile help: Makefile
@echo "Ubuntu software installator" @echo "Ubuntu software installator"
@echo @echo
@echo "Usage:\n make help|- show this help\n make self|- regenerate Makefile (alias of ./gen-makefile)\n make GOAL|- install software\n make ^GOAL|- upgrade software\n make /GOAL|- uninstall software" | column -ts '|' @echo "Usage:"
@echo "\tmake help\t - show this help"
@echo "\tmake self\t - regenerate Makefile (alias of ./gen-makefile)"
@echo "\tmake GOAL\t - install software"
@echo "\tmake ^GOAL\t - upgrade software"
@echo "\tmake /GOAL\t - uninstall software"
@echo "\nYou can combine GOALs, here are some examples:" @echo "\nYou can combine GOALs, here are some examples:"
@echo "\tmake @docker docker" @echo "\tmake /docker docker"
@echo "\tmake php @docker ^omz" @echo "\tmake php /docker ^omz"
@echo "\nAvailable GOALs:" @echo "\nAvailable GOALs:"
@sed -n '/^#/{N;s/# *\(.*\)\n\([^# .].*:\)/\t\2\1/p}' $< | column -ts ':' @sed -n 's/^##//p' $< | column -ts ':' | sed -e "s/^/\t/"
+%:
@
^%:
@./upgrade/
@%:
@./uninstall/

View File

@ -5,7 +5,7 @@
## Requirements ## Requirements
* Ubuntu >= 20.04 (not tested with version < 20) * Ubuntu >= 20.04 (not tested with version < 20)
* `bash`, `zsh` or other POSIX-compatible shell * `bash`, `zsh` or other `sh`-compatible shell
* `make` (optional but recommended) * `make` (optional but recommended)
* `wget` (necessary for some scripts) * `wget` (necessary for some scripts)
* `git` (necessary for some scripts) * `git` (necessary for some scripts)
@ -66,11 +66,11 @@ Syntax is same as classic makefile.
It is important to add a comment with short description: It is important to add a comment with short description:
```makefile ```makefile
# Pack description ##mypack1: Pack description
mypack1: goal1 goal2 goalX ... mypack1: goal1 goal2 goalX ...
... ...
# Pack description ##mypackX: Pack description
mypackX: goalA goalB mypackX: goalA goalB
@cp file1 file2 @cp file1 file2
... ...

View File

@ -18,7 +18,7 @@ for file in ./install/*; do
name=${name%.sh} name=${name%.sh}
desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file}) desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file})
[ -z "$desc" ] && desc='<no description>' [ -z "$desc" ] && desc='<no description>'
echo -e "# ${desc}\n${name}:\n\t@${file}\n" >> Makefile echo -e "##${name}: ${desc}\n${name}:\n\t@${file}\n" >> Makefile
done; done;
cat << EOF >> Makefile cat << EOF >> Makefile
@ -72,21 +72,26 @@ cat << EOF >> Makefile
self: self:
@./gen-makefile @./gen-makefile
help: Makefile help: Makefile
@echo "Ubuntu software installator" @echo "Ubuntu software installator"
@echo @echo
@echo "Usage:\n \ @echo "Usage:"
make help|- show this help\n \ @echo "\tmake help\t - show this help"
make self|- regenerate Makefile (alias of ./gen-makefile)\n \ @echo "\tmake self\t - regenerate Makefile (alias of ./gen-makefile)"
make GOAL|- install software\n \ @echo "\tmake GOAL\t - install software"
make ${CHR_UPGRADE}GOAL|- upgrade software\n \ @echo "\tmake ${CHR_UPGRADE}GOAL\t - upgrade software"
make ${CHR_UNINSTALL}GOAL|- uninstall software" | column -ts '|' @echo "\tmake ${CHR_UNINSTALL}GOAL\t - uninstall software"
@echo "\nYou can combine GOALs, here are some examples:" @echo "\nYou can combine GOALs, here are some examples:"
@echo "\tmake @docker docker" @echo "\tmake ${CHR_UNINSTALL}docker docker"
@echo "\tmake php @docker ^omz" @echo "\tmake php ${CHR_UNINSTALL}docker ${CHR_UPGRADE}omz"
@echo "\nAvailable GOALs:" @echo "\nAvailable GOALs:"
@sed -n '/^#/{N;s/# *\(.*\)\n\([^# .].*:\)/\t\2\1/p}' $< | column -ts ':' @sed -n 's/^##//p' $< | column -ts ':' | sed -e "s/^/\t/"
+%:
@$(MAKE) $*
^%:
@./upgrade/$*
@%:
@./uninstall/$*
EOF EOF
echo "New ./Makefile has been generated!" echo "New ./Makefile has been generated!"

View File

@ -17,10 +17,11 @@ installed() {
if installed "composer"; then if installed "composer"; then
echo "WARNING: Removing current composer to install its actual version" echo "WARNING: Removing current composer to install its actual version"
sudo apt remove -y --autoremove composer sudo apt remove -y --autoremove composer
sudo rm /bin/composer sudo rm -f $HOME/.local/bin/composer
sudo rm /usr/bin/composer sudo rm -f /bin/composer
sudo rm /usr/local/bin/composer sudo rm -f /usr/bin/composer
sudo rm /usr/src/composer sudo rm -f /usr/local/bin/composer
sudo rm -f /usr/src/composer
rm $HOME/.local/bin/composer rm $HOME/.local/bin/composer
fi fi
@ -37,7 +38,7 @@ if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
exit 1 exit 1
fi fi
php composer-setup.php --quiet php composer-setup.php --quiet
cp $HOME/install/composer.phar $HOME/.local/bin/composer mv -f $HOME/install/composer.phar $HOME/.local/bin/composer
cd - >/dev/null cd - >/dev/null
COMPOSER_GLOBAL_HOME="$(composer config -g home)" COMPOSER_GLOBAL_HOME="$(composer config -g home)"

View File

@ -27,5 +27,4 @@ echo
echo "Finish!" echo "Finish!"
echo echo
phpcs --version # phpcbf --version psalm --version
php-cs-fixer --version

View File

@ -1,4 +1,2 @@
# [TODO] [PACK] Install qt5 + flameshot from source ##flameshot: [TODO] [PACK] qt5 + flameshot from source
flameshot: flameshot: qt5 flameshot-build
qt5
flameshot-build

View File

@ -1,5 +1,2 @@
# [PACK] Install apache + php + mariadb ##lamp: [PACK] Apache + php + mariadb
lamp: lamp: apache phpstack mariadb
apache
php-stack
mariadb

View File

@ -1,4 +1,2 @@
# [PACK] Install OBS Studio + droidcam-obs ##obs: [PACK] Install OBS Studio + droidcam-obs
obs: obs: obs-studio droidcam-obs
obs-studio
droidcam-obs

View File

@ -1,7 +1,4 @@
# [PACK] Install zsh + omz + powerline10k + MesloLGS font ##omz: [PACK] zsh + omz + powerline10k + MesloLGS font
omz: omz: zsh omz-clean omz-fancy
zsh
omz-clean
omz-fancy
chsh -s /usr/bin/zsh chsh -s /usr/bin/zsh
@exec zsh @exec zsh

View File

@ -1,4 +0,0 @@
# [PACK] Install full php stack with tooling
phptools:
php
php-tools

View File

@ -1,9 +0,0 @@
# [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

2
packs/phpstack 100644
View File

@ -0,0 +1,2 @@
##phptools: [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, php-spx, phpmd)
phptools: composer php-psalm php-spx phpcs phpmd phpstan phpunit

2
packs/phptools 100644
View File

@ -0,0 +1,2 @@
##phpstack: [PACK] Install full php stack with tooling
phpstack: php phptools