Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions images/ubuntu/scripts/build/install-android-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ add_filtered_installation_components() {
local tools_array=("$@")

for item in ${tools_array[@]}; do
# Take the last argument after splitting string by ';'' and '-''
item_version=$(echo "${item##*[-;]}")
# Take the last version number that appears after the last '-' or ';'
item_version=$(echo "$item" | grep -oP '(?<=[-;])[0-9.]+')

# Semver 'comparison'. Add item to components array, if item's version is greater than or equal to minimum version
if [[ "$(printf "${minimum_version}\n${item_version}\n" | sort -V | head -n1)" == "$minimum_version" ]]; then
Expand Down