diff --git a/scripts/remaster_rootfs.sh b/scripts/remaster_rootfs.sh index 294b42dce10b5931c5fc14e0dfb16f6f707eca87..544ed11cf7f3c6102fcf250085295058fc72c6e7 100755 --- a/scripts/remaster_rootfs.sh +++ b/scripts/remaster_rootfs.sh @@ -10,6 +10,13 @@ if [ -e "$SCRIPT_DIR/scripts/common_functions.sh" ]; then source "$SCRIPT_DIR/scripts/common_functions.sh" fi +if [ -e "$SCRIPT_DIR/scripts/uck_functions.sh" ]; then + source "$SCRIPT_DIR/scripts/uck_functions.sh" +else + echo "Error: $SCRIPT_DIR/scripts/uck_functions.sh is missing." + exit 1 +fi + if [ ! -d "$SCRIPT_DIR" ]; then echo "Error: Missing remaster directory/files. Abort." exit 2 @@ -60,23 +67,6 @@ function install_packages_from_file() aptitude install -y $APT_OPTIONS $PKGS } -function install_lang_packages() -{ - #the content of this function is extracted from UCK - MISSING_LANG_PKG="$(check-language-support -l de_DE)" - MISSING_LANG_PKG="$(check-language-support -l en_US) $MISSING_LANG_PKG" # check for missing packages for de_DE and en_US - - if [ -n "$MISSING_LANG_PKG" ]; then - aptitude install $MISSING_LANG_PKG -y - fi - - EXTRA_LANG_PKG="$(dpkg-query --show | cut -f1 | grep -E '^(language-pack|language-support|firefox-locale|thunderbird-locale|libreoffice-help|libreoffice-l10n)' | grep -Ev "[-](de|en)\>")" # remove extra language packages - - if [ -n "$EXTRA_LANG_PKG" ]; then - aptitude purge $EXTRA_LANG_PKG -y - fi -} - function install_packages() { apt-get dist-upgrade --assume-yes --force-yes diff --git a/scripts/uck_functions.sh b/scripts/uck_functions.sh new file mode 100644 index 0000000000000000000000000000000000000000..3890171ad8d34b62bbbe643a5e41044100f17297 --- /dev/null +++ b/scripts/uck_functions.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +function install_lang_packages() +{ + #the content of this function is extracted from UCK + MISSING_LANG_PKG="$(check-language-support -l de_DE)" + MISSING_LANG_PKG="$(check-language-support -l en_US) $MISSING_LANG_PKG" # check for missing packages for de_DE and en_US + + if [ -n "$MISSING_LANG_PKG" ]; then + aptitude install $MISSING_LANG_PKG -y + fi + + EXTRA_LANG_PKG="$(dpkg-query --show | cut -f1 | grep -E '^(language-pack|language-support|firefox-locale|thunderbird-locale|libreoffice-help|libreoffice-l10n)' | grep -Ev "[-](de|en)\>")" # remove extra language packages + + if [ -n "$EXTRA_LANG_PKG" ]; then + aptitude purge $EXTRA_LANG_PKG -y + fi +}