Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Symfony router:match
- rtm() {
- url=$1
- # remove domain
- url=`echo $url | sed -r 's#.*//[^/]+##g'`
- # add leading slash
- firstChar="${url:0:1}"
- [ ! $firstChar == "/" ] && url=/$url
- match=$(script -q -c "core/symfony/app/backend/console router:match $url")
- if [[ $match = *'None of the routes match'* ]]
- then
- console router:match $url/
- else
- echo "$match"
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement