summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-04-04 18:28:55 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-04-04 18:28:55 +0200
commit56adf00a6b154ece03ec0f6ee41390dbe35647bb (patch)
treec0e4e2b789ea9efff085706a8cfca0c41d19271e
parent61c195802f8fd921e371f8d5846068471f9b9a4a (diff)
Do not remove extensions
Instead, remove languages and dictionaries other than en-US It will help to reduce the size of the repo Change-Id: Ie46a73607565ec56ff26336631620f716928da92
-rwxr-xr-xbibisect/buildWinReleasesRepository.sh30
1 files changed, 27 insertions, 3 deletions
diff --git a/bibisect/buildWinReleasesRepository.sh b/bibisect/buildWinReleasesRepository.sh
index 8d54499b..6e44e2e1 100755
--- a/bibisect/buildWinReleasesRepository.sh
+++ b/bibisect/buildWinReleasesRepository.sh
@@ -100,15 +100,39 @@ do
sed -i '/UserInstallation/d' $rootDir/instdir/program/bootstrap.ini
echo "UserInstallation=\$ORIGIN/.." >> $rootDir/instdir/program/bootstrap.ini
+ echo "*** Removing unneeded dictionaries"
+ dictionaries=$(find $rootDir/instdir/share/extensions/ -type d -name dict-*)
+ for dict in $dictionaries
+ do
+ if [[ ${dict} != *"dict-en" ]];then
+ rm -r $dict
+ fi
+ done
+
+ echo "*** Removing unneeded languages"
+ # Use zh-TW/zh_TW to find the location of other languages not needed
+ for string in zh-TW zh_TW;
+ do
+ findOutput=$(find $rootDir/instdir/ -name *$string*)
+ for path in $findOutput
+ do
+ generalPath="${path/$string/"*"}"
+ lsOutput=$(ls -d $generalPath)
+ for filePath in $lsOutput
+ do
+ if [[ ${filePath} != *"US"* ]];then
+ rm -r $filePath
+ fi
+ done
+ done
+ done
+
echo "*** Cleaning destination"
rm -rf ${targetDir}/instdir/
echo "*** Moving files to destination"
mv $rootDir/instdir/ ${targetDir}/instdir/
- echo "*** Removing extensions"
- rm -rf ${targetDir}/instdir/share/extensions/
-
cd ${targetDir}
par1=libreoffice-$input
echo "*** Creating commit $par1"