glibc replace turkish buggy locale file

This commit is contained in:
aliriza committed 2022-11-25 08:39:39 +00:00
1 parent 28982e3a99
commit ca5992347a
9 files changed
+251 -7

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
#!/bin/sh
set -e
LOCALEGEN=/etc/locale.gen
LOCALES=/usr/share/i18n/locales
if [ -n "$POSIXLY_CORRECT" ]; then
unset POSIXLY_CORRECT
fi
[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
# Remove all old locale dir and locale-archive before generating new
# locale data.
mkdir -p /usr/lib64/locale/
rm -rf /usr/lib64/locale/locale-archive || true
umask 022
is_entry_ok() {
if [ -n "$locale" -a -n "$charset" ] ; then
true
else
echo "error: Bad entry '$locale $charset'"
false
fi
}
echo "Generating locales..."
while read locale charset; do \
case $locale in \#*) continue;; "") continue;; esac; \
is_entry_ok || continue
echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
echo -n ".$charset"; \
echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
echo -n '...'; \
if [ -f $LOCALES/$locale ]; then input=$locale; else \
input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
echo ' done'; \
done < $LOCALEGEN
echo "Generation complete."
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
export LANG=C
export LC_ALL=C
check(){
file="$1"
echo -en "\033[2K\rChecking: $file"
ldd $file |& grep "not found" | tr -s " " | cut -f1 -d" " | while read missing ; do
echo -en "\033[2K\r"
echo -e "\033[31;1m$file\033[;0m => $missing"
done | sort | uniq
}
find /lib64 /lib32 /lib /usr/lib /usr/lib64 /usr/lib32 -type f |& while read file; do
check $file
done
find /bin /sbin /usr/bin/ /usr/sbin -type f |& while read file; do
check $file
done
echo -en "\033[2K\r"