From a5e6876e6ef10a461071d942beec10d716985144 Mon Sep 17 00:00:00 2001 From: Peter Gerber Date: Mon, 31 Oct 2022 21:53:57 +0000 Subject: [PATCH] Make update-torbrowser work with new multi-lang builds As of v12.0a4 Tor Browser is shipped as a multi-language archive and language-specific archives are no longer available. This patch makes this new multi-lang version install properly but does not handle starting Tor Browser with the correct locale. I'm not entirely sure how the locale should be handled. Is it good enough to just use the system language (which Tor Browser now does by default) or should some other solution be used? If the system language is good enough, I'd suggest just merging this change as is and once v12 stable is released TB_LANG support can be removed. --- usr/bin/update-torbrowser | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr/bin/update-torbrowser b/usr/bin/update-torbrowser index 9093c0e..68a6844 100755 --- a/usr/bin/update-torbrowser +++ b/usr/bin/update-torbrowser @@ -1356,7 +1356,10 @@ tb_version_processing() { fi ## Check if TB_LANG exists and is not empty. - if [[ "$TB_LANG" && "${TB_LANG}" ]]; then + if dpkg --compare-versions "$tbb_version" ge "12.0a4" ; then + echo "INFO: Requested Tor Browser version only support an ALL locale, fetching it." + TB_LANG="ALL" + elif [[ "$TB_LANG" && "${TB_LANG}" ]]; then #echo "INFO: Tor Browser language variable is set to "$TB_LANG"." echo "INFO: $tb_title language variable TB_LANG is already set to '$TB_LANG'. Keeping it as is, ok." else