File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
# Script to install scenarios file. Pass in language code parameter for a particular language, such as it-it for Italian.
2
2
set -e
3
3
4
- # Define the language parameter
4
+ # TODO: make parameters mandatory
5
5
LANG=" $1 "
6
- SCENARIOS=" "
6
+ RELEASE=" $2 "
7
+
8
+ # If no release is specified, download the latest release
9
+ if [ " $RELEASE " == " " ]; then
10
+ RELEASE=" latest"
11
+ fi
7
12
8
13
# Map the language parameter to the corresponding scenarios file
9
14
# If no parameter, download the scenarios from IE
10
15
if [ " $LANG " = " " ]; then
11
- SCENARIOS=' https://github.com/Azure/InnovationEngine/releases/download/latest /scenarios.zip'
16
+ SCENARIOS=" https://github.com/Azure/InnovationEngine/releases/download/$RELEASE /scenarios.zip"
12
17
# Otherwise, download the scenarios from Microsoft Docs in the appropriate langauge
13
18
elif [ " $LANG " = " en-us" ]; then
14
19
SCENARIOS=' https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/scenarios.zip'
15
20
else
16
21
SCENARIOS=" https://github.com/MicrosoftDocs/executable-docs/releases/download/v1.0.1/$LANG -scenarios.zip"
17
22
fi
18
23
19
- # Download the binary from the latest
20
- echo " Installing IE & scenarios from the latest release..."
21
- wget -q -O ie https://github.com/Azure/InnovationEngine/releases/download/latest /ie > /dev/null
24
+ # Download the binary
25
+ echo " Installing IE & scenarios from the $RELEASE release..."
26
+ wget -q -O ie https://github.com/Azure/InnovationEngine/releases/download/$RELEASE /ie > /dev/null
22
27
wget -q -O scenarios.zip " $SCENARIOS " > /dev/null
23
28
24
29
# Setup permissions & move to the local bin
You can’t perform that action at this time.
0 commit comments