Optimized code and removed shellcheck errors

This commit is contained in:
Kevin Frantz 2019-01-05 12:38:58 +01:00
parent 62cad9bca0
commit 1ec19bbbbe
23 changed files with 60 additions and 47 deletions

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php /bin/bash)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" || exit 1
docker-compose exec php /bin/bash

View File

@ -1,8 +1,6 @@
#!/bin/bash
(
cd $(dirname $(readlink -f ${0}))/;
bash ./copy-configuration.sh
cd ../docker-symfony;
docker-compose build;
docker-compose up -d;
)
cd "$(dirname "$(readlink -f "${0}")")/" &&
bash ./copy-configuration.sh &&
cd ../docker-symfony &&
docker-compose build &&
docker-compose up -d

View File

@ -1,3 +1,4 @@
#!/bin/bash
echo "Untracked and ignored files will be deleted..."
(cd $(dirname $(readlink -f ${0}))/../ && git clean -fXd)
cd "$(dirname "$(readlink -f "${0}")")/../" &&
git clean -fXd

View File

@ -1,2 +1,6 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php php /var/www/symfony/bin/console cache:clear && docker-compose exec php php /var/www/symfony/bin/console cache:clear --env=prod)
(
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" &&
docker-compose exec php php /var/www/symfony/bin/console cache:clear &&
docker-compose exec php php /var/www/symfony/bin/console cache:clear --env=prod
)

View File

@ -1,2 +1,6 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/&& docker-compose exec php composer install && docker-compose exec php composer update)
(
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" &&
docker-compose exec php composer install &&
docker-compose exec php composer update
)

View File

@ -1,5 +1,5 @@
#!/bin/bash
# Copies the configuration files
cd $(dirname $(readlink -f ${0}))/../;
cp -v .env.dist docker-symfony/.env;
cp -v ./application/phpunit.xml.dist ./application/phpunit.xml;
cd "$(dirname "$(readlink -f "${0}")")/../" || exit 1
cp -v .env.dist docker-symfony/.env
cp -v ./application/phpunit.xml.dist ./application/phpunit.xml

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php php vendor/bin/php-cs-fixer fix .)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" || exit 1
docker-compose exec php php vendor/bin/php-cs-fixer fix .

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php php -d memory_limit=128M /var/www/symfony/vendor/bin/phpunit --coverage-html var/test-coverage-report)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" || exit 1
docker-compose exec php php -d memory_limit=128M /var/www/symfony/vendor/bin/phpunit --coverage-html var/test-coverage-report

View File

@ -1,9 +1,7 @@
#!/bin/bash
(
cd $(dirname $(readlink -f ${0}));
bash ./submodule-init.sh
bash ./build.sh
bash ./composer-update.sh
bash ./schema-update.sh
bash ./load-fixtures.sh
)
cd "$(dirname "$(readlink -f "${0}")")" &&
bash ./submodule-init.sh &&
bash ./build.sh &&
bash ./composer-update.sh &&
bash ./schema-update.sh &&
bash ./load-fixtures.sh

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php php bin/console doctrine:fixtures:load -n)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" || exit 1
docker-compose exec php php bin/console doctrine:fixtures:load -n

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec db mysql -proot -u root)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" || exit 1
docker-compose exec db mysql -proot -u root

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php php bin/console debug:router);
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" || exit 1
docker-compose exec php php bin/console debug:router

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php php bin/console doctrine:schema:update --force)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" || exit 1
docker-compose exec php php bin/console doctrine:schema:update --force

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php bin/console doctrine:schema:validate)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" &&
docker-compose exec php bin/console doctrine:schema:validate

View File

@ -1,3 +1,3 @@
#!/bin/bash
cd $(dirname $(readlink -f ${0}))/;
cd "$(dirname "$(readlink -f "${0}")")/" &&
shellcheck ./*.sh

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose up -d)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" &&
docker-compose up -d

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose stop)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" &&
docker-compose stop

View File

@ -1,5 +1,3 @@
#!/bin/bash
(
cd $(dirname $(readlink -f ${0}))/../;
cd "$(dirname "$(readlink -f "${0}")")/../" &&
git submodule update --init --recursive
)

View File

@ -1,6 +1,4 @@
#!/bin/bash
(
cd $(dirname $(readlink -f ${0}))/../;
git submodule sync;
git submodule foreach git pull origin master;
)
cd "$(dirname "$(readlink -f "${0}")")/../" &&
git submodule sync &&
git submodule foreach git pull origin master

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php php ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ./src)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" || exit 1
docker-compose exec php php ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ./src

View File

@ -1,7 +1,6 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/ &&
cd "$(dirname "$(readlink -f "${0}")")/" &&
bash ./clear.sh &&
bash ./schema-validate.sh &&
bash ./test.sh &&
bash ./test-code-format.sh
)

View File

@ -1,2 +1,3 @@
#!/bin/bash
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php php -d memory_limit=128M /var/www/symfony/vendor/bin/phpunit)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" &&
docker-compose exec php php -d memory_limit=128M /var/www/symfony/vendor/bin/phpunit

View File

@ -1,4 +1,5 @@
#!/bin/sh
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php rm -vr var)
(cd $(dirname $(readlink -f ${0}))/../docker-symfony/ && docker-compose exec php rm -vr vendor )
(cd $(dirname $(readlink -f ${0}))/ && bash cleanup-ignored.sh)
cd "$(dirname "$(readlink -f "${0}")")/../docker-symfony/" || exit 1
docker-compose exec php rm -vr var
docker-compose exec php rm -vr vendor
cd "$(dirname "$(readlink -f "${0}")")/" && bash cleanup-ignored.sh