Files
pcm-metadata-bundle/bin/quickstart
pcm-internal 2a82b5c0b1 Initial commit
2025-11-27 13:22:07 +00:00

20 lines
781 B
Bash
Executable File

#!/bin/bash
read -p "If your bundle is going to be \"pcm/example-bundle\", type \"ExampleBundle\".
Please enter the name of your bundle: " ANS
echo "Changing ExampleBundle to $ANS."
# When running sed, the `-i "" e` is for MacOS, and I think it writes the files instead of sending to stdout?
find . -type f ! -name "quickstart" ! -name "README.md" ! -name "LICENSE" ! -path "*/.*" ! -wholename "*/vendor/*" -exec sed -i "" -e "s/ExampleBundle/$ANS/g" {} ';'
# Rename PcmExampleBundle
mv src/PcmExampleBundle.php src/Pcm${ANS}.php
echo "Ok that's probably worked, check git to make sure though."
echo "Also don't forget to update the name and description key in composer.json if you haven't already!"
echo "Installing dependencies..."
docker compose run php composer install