3 # vim: expandtab sw=4 ts=4 sts=4:
5 # Script for removing language selection from phpMyAdmin
8 echo "Usage: lang-cleanup.sh type"
9 echo "Type can be one of:"
10 echo " all-languages - nothing will be done"
11 echo " english - no translations will be kept"
12 echo " langcode - keeps language"
14 echo "Languages can be specified multiple times"
31 match
="$match -and -not -name $type.po -and -not -path locale/$type/LC_MESSAGES/phpmyadmin.mo"
36 # Delete unvanted languages
37 find po locale
-type f
$match -print0 |
xargs -0r rm
39 # Delete empty directories
40 rmdir --ignore-fail-on-non-empty locale
/*/*
41 rmdir --ignore-fail-on-non-empty locale
/*