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