Skip to content

Commit

Permalink
Fixed issue with installing dependencies for suse systems (#3507)
Browse files Browse the repository at this point in the history
* Fixed issue with installing dependencies for suse systems

* Fixed dependency for sles

* Fixed space
  • Loading branch information
Anatoly Bolshakov authored Aug 20, 2021
1 parent fb460c3 commit a82b01b
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/Misc/layoutbin/installdependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,16 +209,30 @@ then
fi
fi
else

# we might on OpenSUSE
OSTYPE=$(grep ID_LIKE /etc/os-release | cut -f2 -d=)
if [ -z $OSTYPE ]
OSTYPE=$(grep ID /etc/os-release | cut -f2 -d=)
fi
echo $OSTYPE
if [ $OSTYPE == '"suse"' ]

# is_sles=1 if it is a SLES OS
[ -n $OSTYPE ] && ([ $OSTYPE == '"sles"' ] || [ $OSTYPE == '"sles_sap"' ]) && is_sles=1

if [[ -n $OSTYPE && ( $OSTYPE == '"suse"' || $is_sles == 1) ]]
then
echo "The current OS is SUSE based"
command -v zypper
if [ $? -eq 0 ]
then
zypper -n install lttng-ust libopenssl1_0_0 krb5 zlib libicu52_1
if [[ -n $is_sles ]]
then
zypper -n install lttng-ust libopenssl1_1 krb5 zlib libicu
else
zypper -n install lttng-ust libopenssl1_0_0 krb5 zlib libicu
fi

if [ $? -ne 0 ]
then
echo "'zypper' failed with exit code '$?'"
Expand Down

0 comments on commit a82b01b

Please sign in to comment.