Skip to content

Commit

Permalink
feat: PHP-CS-Fixer binary
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Dec 14, 2023
1 parent ff33ded commit 7ba66d1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ test:

.PHONY: install
install:
@sudo ln -sf $(shell pwd)/bin/composer /usr/local/bin/composer
@sudo ln -sf $(shell pwd)/bin/php /usr/local/bin/php
@sudo ln -sf $(shell pwd)/bin/phpctl /usr/local/bin/pctl
@sudo ln -sf $(shell pwd)/bin/phpctl /usr/local/bin/phpctl
@sudo ln -sf $(shell pwd)/bin/phpunit /usr/local/bin/phpunit
@sudo ln -sf $(shell pwd)/bin/composer /usr/local/bin/composer
@sudo ln -sf $(shell pwd)/bin/php /usr/local/bin/php
@sudo ln -sf $(shell pwd)/bin/php-cs-fixer /usr/local/bin/php-cs-fixer
@sudo ln -sf $(shell pwd)/bin/phpctl /usr/local/bin/pctl
@sudo ln -sf $(shell pwd)/bin/phpctl /usr/local/bin/phpctl
@sudo ln -sf $(shell pwd)/bin/phpunit /usr/local/bin/phpunit
2 changes: 2 additions & 0 deletions bin/php-cs-fixer
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
phpctl php-cs-fixer $@
22 changes: 12 additions & 10 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
INSTALL_DIR=~/.phpctl

symlink() {
sudo ln -sf "${INSTALL_DIR}/bin/composer" /usr/local/bin/composer
sudo ln -sf "${INSTALL_DIR}/bin/php" /usr/local/bin/php
sudo ln -sf "${INSTALL_DIR}/bin/phpctl" /usr/local/bin/pctl
sudo ln -sf "${INSTALL_DIR}/bin/phpctl" /usr/local/bin/phpctl
sudo ln -sf "${INSTALL_DIR}/bin/phpunit" /usr/local/bin/phpunit
sudo ln -sf "${INSTALL_DIR}/bin/composer" /usr/local/bin/composer
sudo ln -sf "${INSTALL_DIR}/bin/php" /usr/local/bin/php
sudo ln -sf "${INSTALL_DIR}/bin/php-cs-fixer" /usr/local/bin/php-cs-fixer
sudo ln -sf "${INSTALL_DIR}/bin/phpctl" /usr/local/bin/pctl
sudo ln -sf "${INSTALL_DIR}/bin/phpctl" /usr/local/bin/phpctl
sudo ln -sf "${INSTALL_DIR}/bin/phpunit" /usr/local/bin/phpunit
}

echo "\033[0;33mInstalling phpctl at \033[0m$INSTALL_DIR"
Expand All @@ -21,10 +22,11 @@ if [ "$answer" != "${answer#[Yy]}" ]; then
else
echo "\033[0;31mTo use phpclt globally, link the cloned script to your bin directory, like:\033[0m"
echo ""
echo " sudo ln -sf ${INSTALL_DIR}/bin/composer /usr/local/bin/composer"
echo " sudo ln -sf ${INSTALL_DIR}/bin/php /usr/local/bin/php"
echo " sudo ln -sf ${INSTALL_DIR}/bin/phpctl /usr/local/bin/pctl"
echo " sudo ln -sf ${INSTALL_DIR}/bin/phpctl /usr/local/bin/phpctl"
echo " sudo ln -sf ${INSTALL_DIR}/bin/phpunit /usr/local/bin/phpunit"
echo " sudo ln -sf ${INSTALL_DIR}/bin/composer /usr/local/bin/composer"
echo " sudo ln -sf ${INSTALL_DIR}/bin/php /usr/local/bin/php"
echo " sudo ln -sf ${INSTALL_DIR}/bin/php-cs-fixer /usr/local/bin/php-cs-fixer"
echo " sudo ln -sf ${INSTALL_DIR}/bin/phpctl /usr/local/bin/pctl"
echo " sudo ln -sf ${INSTALL_DIR}/bin/phpctl /usr/local/bin/phpctl"
echo " sudo ln -sf ${INSTALL_DIR}/bin/phpunit /usr/local/bin/phpunit"
echo ""
fi

0 comments on commit 7ba66d1

Please sign in to comment.