3 # vim: expandtab sw=4 ts=4 sts=4:
5 # Script for removing language selection from phpMyAdmin
8 if [ -n "$GATEWAY_INTERFACE" ] ; then
9 echo 'Can not invoke as CGI!'
13 if [ $# -lt 1 ] ; then
14 echo "Usage: lang-cleanup.sh type"
15 echo "Type can be one of:"
16 echo " all-languages - nothing will be done"
17 echo " source - nothing will be done"
18 echo " english - no translations will be kept"
19 echo " langcode - keeps language"
21 echo "Languages can be specified multiple times"
38 match
="$match -and -not -name $type.po -and -not -path locale/$type/LC_MESSAGES/phpmyadmin.mo"
43 # Delete unvanted languages
44 find po locale
-type f
$match -print0 |
xargs -0r rm
46 # Delete empty directories
47 rmdir --ignore-fail-on-non-empty locale
/*/*
48 rmdir --ignore-fail-on-non-empty locale
/*