Skip to content

Commit

Permalink
Removing dead lang2locale function and associated files, not used any…
Browse files Browse the repository at this point in the history
…where.
  • Loading branch information
daniel-baumann committed Jun 5, 2012
1 parent a89bf1d commit dc6d1a0
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 135 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -50,7 +50,7 @@ install:
cp bin/live-new-uuid bin/live-snapshot bin/live-swapfile $(DESTDIR)/sbin

mkdir -p $(DESTDIR)/usr/share/live-boot
cp bin/live-preseed bin/live-reconfigure local/languagelist $(DESTDIR)/usr/share/live-boot
cp bin/live-preseed bin/live-reconfigure $(DESTDIR)/usr/share/live-boot

mkdir -p $(DESTDIR)/usr/share/initramfs-tools
cp -r initramfs-tools/* $(DESTDIR)/usr/share/initramfs-tools
Expand Down
7 changes: 0 additions & 7 deletions initramfs-tools/hooks/live
Expand Up @@ -54,13 +54,6 @@ fi
mkdir -p "${DESTDIR}/lib/live"
cp -a /lib/live/boot.sh /lib/live/boot "${DESTDIR}/lib/live"

# Configuration
if [ -e /usr/share/live-boot/languagelist ]
then
mkdir -p "${DESTDIR}"/usr/share/live-boot
cp /usr/share/live-boot/languagelist "${DESTDIR}"/usr/share/live-boot
fi

# Directories
mkdir -p "${DESTDIR}"/lib/live-boot

Expand Down
98 changes: 0 additions & 98 deletions local/languagelist

This file was deleted.

29 changes: 0 additions & 29 deletions scripts/boot/misc-helpers.sh
Expand Up @@ -17,35 +17,6 @@ really_export ()
eval export "${STRING}"="${VALUE}"
}

lang2locale() {
langpart="${1%%_*}"
if [ "$1" != "C" ]; then
# Match the language code with 3rd field in languagelist
line=$(grep -v "^#" /usr/share/live-boot/languagelist | cut -f1,3,6 -d\; | grep -v ';C$' | grep "^$langpart;")
if [ -n "$line" ]; then
if [ "$(echo "$line" | grep -c '')" -gt 1 ]; then
# More than one match; try matching the
# country as well.
countrypart="${1#*_}"
if [ "$countrypart" = "$1" ]; then
countryline="$(echo "$line" | head -n1)"
echo "${countryline##*;}"
return
fi
countrypart="${countrypart%%[@.]*}"
countryline="$(echo "$line" | grep ";$countrypart;" | head -n1 || true)"
if [ "$countryline" ]; then
echo "${countryline##*;}"
return
fi
fi
echo "${line##*;}"
fi
else
echo "C"
fi
}

is_in_list_separator_helper () {
local sep=${1}
shift
Expand Down

0 comments on commit dc6d1a0

Please sign in to comment.