BFA protected phpmyadmin
One potential security issue: what if ${drt} is not set before this is run?  A safety check will be very useful.

As for your wider issue, rather than having to download it every time, would it not be just as effective to remove the permissions on the phpmyadmin directory?  If you set it to 000, then nobody should be able to access it nor its contents.