Skip to content

Commit

Permalink
Add support for AzureLinux 3 to installdependencies (#5036)
Browse files Browse the repository at this point in the history
* Add Azure Linux if condition

* Add non empty check for is_sles
  • Loading branch information
ivanduplenskikh authored Nov 14, 2024
1 parent 65a42bd commit 4ca4f04
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/Misc/layoutbin/installdependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ then
is_sles=1
fi

if ([[ -n $OSTYPE ]] && ([[ $OSTYPE == *"suse"* ]] || [[$is_sles == 1]]))
if ([[ -n $OSTYPE ]] && ([[ $OSTYPE == *"suse"* ]] || ([[ -n $is_sles ]] && [[ $is_sles == 1 ]])))
then
echo "The current OS is SUSE based"
command -v zypper
Expand Down Expand Up @@ -317,6 +317,28 @@ then
print_errormessage
exit 1
fi
elif [ -e /etc/azurelinux-release ]
then
echo "The current OS is Azure Linux based"
echo "--------Azure Linux Version--------"
cat /etc/azurelinux-release
echo "------------------------------"

command -v tdnf
if [ $? -eq 0 ]
then
tdnf install -y icu
if [ $? -ne 0 ]
then
echo "'tdnf' failed with exit code '$?'"
print_errormessage
exit 1
fi
else
echo "Can not find 'tdnf'"
print_errormessage
exit 1
fi
else
echo "Can't detect current OS type based on $filepath."
print_errormessage
Expand Down

0 comments on commit 4ca4f04

Please sign in to comment.