From: Jon Trulson Date: Sat, 2 Jun 2018 01:47:41 +0000 (-0600) Subject: installCDE: Only install locales that were built X-Git-Tag: 2.2.4a~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fd9e74ae42a5990de5e6ebc90efca84d0fa38745;p=oweals%2Fcde.git installCDE: Only install locales that were built We pass the DtLocalesToBuild to installCDE.src, which can then check to see what locales were built. We then only install packages for those locales. --- diff --git a/cde/admin/IntegTools/dbTools/Imakefile b/cde/admin/IntegTools/dbTools/Imakefile index 21c8caf7..2f787413 100644 --- a/cde/admin/IntegTools/dbTools/Imakefile +++ b/cde/admin/IntegTools/dbTools/Imakefile @@ -1,10 +1,13 @@ XCOMM $XConsortium: Imakefile /main/5 1996/04/23 21:26:14 drk $ +DT_LOCALES = DtLocalesToBuild + LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \ -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \ -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \ -DKORNSHELL=$(KORNSHELL) \ - -Usun -Uaix -UAIX -Uibm -Uhp + -Usun -Uaix -UAIX -Uibm -Uhp \ + -DbuiltLocales="\"${DT_LOCALES}\"" AllTarget(installCDE dinstallCDE) diff --git a/cde/admin/IntegTools/dbTools/installCDE.src b/cde/admin/IntegTools/dbTools/installCDE.src index e6d2d00d..e26be3be 100755 --- a/cde/admin/IntegTools/dbTools/installCDE.src +++ b/cde/admin/IntegTools/dbTools/installCDE.src @@ -33,7 +33,7 @@ XCOMM -pack -- create packing list XCOMM -pseudo -- don't configure the desktop XCOMM -nocompress -- don't compress the tarball (-t only) XCOMM -XCOMM -Lang -- load the localized filesets +XCOMM -lang -- load the localized filesets XCOMM -LinkStepOnly -- set up the -pI, -pC, and -pV links XCOMM then exit XCOMM -DontRunScripts -- stop after installation @@ -487,8 +487,8 @@ echo -e "\t[-relative]\t\t\trun the relative-located config scripts" echo -e "\t[-pack]\t\t\t\tcreate a packing list" echo -e "\t[-pseudo]\t\t\tdo not configure desktop when installing" echo -e "\t[-nocompress]\t\t\tdo not compress tarball when creating package" -echo -e "\t[-lang LANG]\t\t\tspecify LANG to load appropriate localized" -echo -e "\t\t\t\t\tfilesets" +echo -e "\t[-lang LANG]\t\t\tspecify LANG to load only appropriate localized" +echo -e "\t\t\t\t\tfilesets for LANG" echo -e "\t[-LeaveLinks]\t\t\t\tdo not delete the links after cleaning" echo -e "" echo -e "\t[-LinkStepOnly]\t\t\tset up the -pI, -pC, and -pV links" @@ -545,7 +545,6 @@ XCOMM don't bother if the fileset doesn't exist cat /tmp/${2}.missing | tee -a $LOGFILE fi } - ORIGINAL_COMMAND_LINE="$*" XCOMM Set which system we are on @@ -628,7 +627,8 @@ XCOMM theLang="" CONFIGURE_ONLY="no" DESTINATION_DIR="/" - + BUILT_LOCALES=builtLocales + Log "Built locales: $BUILT_LOCALES" rm -f $LOGFILE @@ -901,31 +901,48 @@ XCOMM CDE-PRG CDE-INC CDE-DEMOS CDE-MAN-DEV CDE-ICONS \ CDE-FONTS CDE-INFO CDE-INFOLIB-C" fi - HASH now load any localized filesets if [ "$DEVELOP_ENV" != "yes" ] then + if [ "$theLang" != "" ] then DATABASE_FILES="$DATABASE_FILES CDE-$theLang CDE-MSG-$theLang \ CDE-HELP-$theLang" else - HASH load all current (working) languages - DATABASE_FILES="$DATABASE_FILES \ - CDE-DE \ - CDE-MSG-DE \ - CDE-HELP-DE \ - CDE-ES \ - CDE-MSG-ES \ - CDE-HELP-ES \ - CDE-FR \ - CDE-MSG-FR \ - CDE-HELP-FR \ - CDE-IT \ - CDE-MSG-IT \ - CDE-HELP-IT " + HASH load all current (working) languages in $BUILT_LOCALES + + HASH German + if [ "${BUILT_LOCALES#*_DE}" != "$BUILT_LOCALES" ] + then + DATABASE_FILES="$DATABASE_FILES CDE-DE CDE-MSG-DE \ + CDE-HELP-DE" + fi + + HASH French + if [ "${BUILT_LOCALES#*_FR}" != "$BUILT_LOCALES" ] + then + DATABASE_FILES="$DATABASE_FILES CDE-FR CDE-MSG-FR \ + CDE-HELP-FR" + fi + + HASH Italian + if [ "${BUILT_LOCALES#*_IT}" != "$BUILT_LOCALES" ] + then + DATABASE_FILES="$DATABASE_FILES CDE-IT CDE-MSG-IT \ + CDE-HELP-IT" + fi + + HASH Spanish + if [ "${BUILT_LOCALES#*_ES}" != "$BUILT_LOCALES" ] + then + DATABASE_FILES="$DATABASE_FILES CDE-ES CDE-MSG-ES \ + CDE-HELP-ES" + fi + fi fi + fi [ -z "$INSTALL_LOCATION" ] && INSTALL_LOCATION=CDE_INSTALLATION_TOP @@ -1010,7 +1027,7 @@ XCOMM fi Log " " - Log "Desktop installed in $DESTINATION_DIR/$INSTALL_LOCATION" + Log "Desktop installed in ${DESTINATION_DIR}${INSTALL_LOCATION}" if [ "$DO_INSTALL_ONLY" = "yes" ] then