Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

fix(scripts): make client build compatible with Bash 3.2 (macOS) (#7332)

ar9708893afd92be37
diff --git a/scripts/build/client.sh b/scripts/build/client.sh
index 03ed08b070..14aa164874 100755
--- a/scripts/build/client.sh
+++ b/scripts/build/client.sh
@@ -2,49 +2,48 @@
set -eu
-declare -A languages
defaultLanguage="en-US"
-# Supported languages
+# Supported languages (key:locale pairs) - Bash 3.2 compatible for macOS
languages=(
- ["ar"]="ar"
- ["sk"]="sk-SK"
- ["is"]="is"
- ["tr"]="tr-TR"
- ["fa"]="fa-IR"
- ["en"]="en-US"
- ["vi"]="vi-VN"
- ["hu"]="hu-HU"
- ["th"]="th-TH"
- ["fi"]="fi-FI"
- ["nl"]="nl-NL"
- ["gd"]="gd"
- ["el"]="el-GR"
- ["es"]="es-ES"
- ["oc"]="oc"
- ["pt"]="pt-BR"
- ["pt-PT"]="pt-PT"
- ["sv"]="sv-SE"
- ["pl"]="pl-PL"
- ["ru"]="ru-RU"
- ["zh-Hans"]="zh-Hans-CN"
- ["zh-Hant"]="zh-Hant-TW"
- ["fr"]="fr-FR"
- ["ja"]="ja-JP"
- ["eu"]="eu-ES"
- ["ca"]="ca-ES"
- ["gl"]="gl-ES"
- ["cs"]="cs-CZ"
- ["hr"]="hr"
- ["eo"]="eo"
- ["de"]="de-DE"
- ["it"]="it-IT"
- ["uk"]="uk-UA"
- ["sq"]="sq"
- ["tok"]="tok"
- ["nn"]="nn"
- ["nb"]="nb-NO"
- ["kab"]="kab"
+ ar:ar
+ ca:ca-ES
+ cs:cs-CZ
+ de:de-DE
+ el:el-GR
+ en:en-US
+ eo:eo
+ es:es-ES
+ eu:eu-ES
+ fa:fa-IR
+ fi:fi-FI
+ fr:fr-FR
+ gd:gd
+ gl:gl-ES
+ hr:hr
+ hu:hu-HU
+ is:is
+ it:it-IT
+ ja:ja-JP
+ kab:kab
+ nb:nb-NO
+ nl:nl-NL
+ nn:nn
+ oc:oc
+ pl:pl-PL
+ pt:pt-BR
+ pt-PT:pt-PT
+ ru:ru-RU
+ sk:sk-SK
+ sq:sq
+ sv:sv-SE
+ th:th-TH
+ tok:tok
+ tr:tr-TR
+ uk:uk-UA
+ vi:vi-VN
+ zh-Hans:zh-Hans-CN
+ zh-Hant:zh-Hant-TW
)
@@ -63,8 +62,9 @@ if [ -z ${1+x} ] || ([ "$1" != "--light" ] && [ "$1" != "--analyze-bundle" ]); t
NODE_OPTIONS=--max_old_space_size=8192 node_modules/.bin/ng build --configuration production --output-path "dist/build" $additionalParams
- for key in "${!languages[@]}"; do
- lang=${languages[$key]}
+ for entry in "${languages[@]}"; do
+ key="${entry%%:*}"
+ lang="${entry#*:}"
mv "dist/build/browser/$key" "dist/$lang"
diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md
index 60f3115399..ed5c3e83cf 100644
--- a/support/doc/dependencies.md
+++ b/support/doc/dependencies.md
@@ -485,25 +485,11 @@ On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail
1. Add the packages:
```sh
- brew install bash ffmpeg nginx postgresql openssl gcc make redis git
+ brew install ffmpeg nginx postgresql openssl gcc make redis git
brew install yarn # PeerTube <= v7.3 only
brew install pnpm # PeerTube >= v8.0 only
```
- You may need to update your default version of bash.
-
- **How to change your default shell**
-
- ```sh
- which -a bash # Check where bash is installed
- bash --version # You need a version at least as recent as 4.0
- sudo vim /etc/shells # Add in this file : /usr/local/bin/bash
- chsh -s /usr/local/bin/bash # To set the brew-installed bash as default bash
- ```
-
- In a new shell, type `bash --version` to assert your changes took effect and
- correctly modified your default bash version.
-
1. Run the services:
```sh