Compare commits

...

4 Commits

Author SHA1 Message Date
Anthony Axenov f20a161373
Merge branch 'master' of git.axenov.dev:anthony/my-env 2022-12-10 21:59:53 +08:00
Anthony Axenov 3a853564c1
phptools 2022-12-10 21:59:01 +08:00
Anthony Axenov 5abc1c9434
papirus misc 2022-12-10 21:58:53 +08:00
Anthony Axenov 7136fac018
dots misc 2022-12-10 21:58:38 +08:00
8 changed files with 107 additions and 2 deletions

View File

@ -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
#===============================================
@ -142,6 +145,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

View File

@ -0,0 +1,53 @@
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
### AAA ##########################################
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
export LD_LIBRARY_PATH="/opt/oci"
# export NLS_LANG='RUSSIAN_RUSSIA.AL32UTF8'
# export NLS_DATE_FORMAT='DD.MM.YYYY'
# export NLS_CURRENCY='р.'
# export NLS_DUAL_CURRENCY='р.'
# export NLS_CALENDAR='GREGORIAN'
# export NLS_ISO_CURRENCY='RUSSIA'
export JAVA_HOME="/usr/bin/"
export ANDROID_SDK_ROOT="$HOME/android/sdk"
export LITE_SCALE=1 # workaround https://github.com/lite-xl/lite-xl/issues/1173
export PATH="$HOME/.local/share/JetBrains/Toolbox/scripts:$HOME/.config/composer/vendor/bin:$PATH"
# The next line updates PATH for Yandex Cloud CLI.
if [ -f "$HOME/yandex-cloud/path.bash.inc" ]; then source "$HOME/yandex-cloud/path.bash.inc"; fi
# The next line enables shell command completion for yc.
if [ -f "$HOME/yandex-cloud/completion.zsh.inc" ]; then source "$HOME/yandex-cloud/completion.zsh.inc"; fi

View File

@ -110,3 +110,5 @@ source $ZSH/oh-my-zsh.sh
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
[[ -f ~/.profile ]] && source ~/.profile

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"

View File

@ -23,4 +23,3 @@ install .bashrc
install .gitconfig
install .gitignore
install .git_aliases
ln -s "$HOME/.profile" "$HOME/.zprofile"

View File

@ -19,6 +19,7 @@ else
mkdir -p "${HOME}/install/papirus-icon-theme"
wget https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/refs/heads/master.zip -O "${HOME}/install/papirus-icon-theme.zip"
unzip "${HOME}/install/papirus-icon-theme.zip" -d "${HOME}/install/papirus-icon-theme"
rm -f "${HOME}/install/papirus-icon-theme.zip"
fi
mkdir -p "${HOME}/.local/share/icons/"

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 100644
View File

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