@@ -10,44 +10,46 @@ if [ "$RELEASE" == "" ]; then
10
10
RELEASE=" latest"
11
11
fi
12
12
13
+ # Set a default scenarios file
14
+ SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/scenarios.zip"
15
+
13
16
# Map the language parameter to the corresponding scenarios file
14
17
# If no parameter, download the scenarios from IE
15
18
MAIN_LANG_PREFIX=" $( echo " $LANG " | head -c2 | tr ' [:upper:]' ' [:lower:]' ) "
16
- LANG_ARRAY_1=(" de" " es" " fr" " it" " nl" " pt" )
17
- LANG_ARRAY_2=(" cs" " hu" " id" " ja" " ko" " pl" " pt" " ru" " sv" " tr" )
19
+ LANG_ARRAY=(" de" " es" " fr" " it" " nl" " pt" " zh" " cs" " hu" " id" " ja" " ko" " pl" " pt" " ru" " sv" " tr" )
18
20
19
- if [ " $MAIN_LANG_PREFIX " = " " ] || [ " $MAIN_LANG_PREFIX " = " en" ]; then
20
- SCENARIOS=" https://github.com/Azure/InnovationEngine/releases/download/$RELEASE /scenarios.zip"
21
- elif [ " $MAIN_LANG_PREFIX " = " pt" ]; then
22
- if [ " $LANG " = ' pt-pt' ]; then
23
- SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/pt-pt-scenarios.zip"
24
- elif [ " $LANG " = ' pt-br' ]; then
25
- SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/pt-br-scenarios.zip"
21
+ if [[ " ${LANG_ARRAY[*]} " =~ " $MAIN_LANG_PREFIX " ]]; then
22
+ SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/$MAIN_LANG_PREFIX -$MAIN_LANG_PREFIX -scenarios.zip"
23
+ if [ " $MAIN_LANG_PREFIX " = " pt" ]; then
24
+ if [ " $LANG " = " pt-pt" ]; then
25
+ SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/pt-pt-scenarios.zip"
26
+ elif [ " $LANG " = " pt-br" ]; then
27
+ SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/pt-br-scenarios.zip"
28
+ else
29
+ SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/pt-pt-scenarios.zip"
30
+ fi
26
31
fi
27
- elif [ " $MAIN_LANG_PREFIX " = " zh" ]; then
28
- if [ " $LANG " = " zh-cn" ]; then
29
- SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/zh-cn-scenarios.zip"
30
- elif [ " $LANG " = " zh-tw" ]; then
31
- SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/zh-tw-scenarios.zip"
32
- else
33
- SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/zh-cn-scenarios.zip"
32
+ if [ " $MAIN_LANG_PREFIX " = " zh" ]; then
33
+ if [ " $LANG " = " zh-cn" ]; then
34
+ SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/zh-cn-scenarios.zip"
35
+ elif [ " $LANG " = " zh-tw" ]; then
36
+ SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/zh-tw-scenarios.zip"
37
+ else
38
+ SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/zh-cn-scenarios.zip"
39
+ fi
34
40
fi
35
- elif [[ ${LANG_ARRAY_1[@]} =~ $MAIN_LANG_PREFIX ]]; then
36
- # for any other language that we do not have a specific scenarios file for, we will use the generic one
37
- SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/$MAIN_LANG_PREFIX -$MAIN_LANG_PREFIX -scenarios.zip"
38
- elif [[ ${LANG_ARRAY_2[@]} =~ $MAIN_LANG_PREFIX ]]; then
39
- SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/$MAIN_LANG_PREFIX -$MAIN_LANG_PREFIX -scenarios.zip"
40
41
if [ " $MAIN_LANG_PREFIX " = " cs" ]; then
41
42
SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/$MAIN_LANG_PREFIX -cz-scenarios.zip"
42
- elif [ " $MAIN_LANG_PREFIX " = " ja" ]; then
43
+ fi
44
+ if [ " $MAIN_LANG_PREFIX " = " ja" ]; then
43
45
SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/$MAIN_LANG_PREFIX -jp-scenarios.zip"
44
- elif [ " $MAIN_LANG_PREFIX " = " ko" ]; then
46
+ fi
47
+ if [ " $MAIN_LANG_PREFIX " = " ko" ]; then
45
48
SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/$MAIN_LANG_PREFIX -kr-scenarios.zip"
46
- elif [ " $MAIN_LANG_PREFIX " = " sv" ]; then
49
+ fi
50
+ if [ " $MAIN_LANG_PREFIX " = " sv" ]; then
47
51
SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/$MAIN_LANG_PREFIX -se-scenarios.zip"
48
52
fi
49
- else
50
- SCENARIOS=" https://github.com/Azure/InnovationEngine/releases/download/$RELEASE /scenarios.zip"
51
53
fi
52
54
53
55
# Download the binary
0 commit comments