Work on the dependency version if statements.

This commit is contained in:
FusionPBX 2022-03-23 22:38:03 -06:00 committed by GitHub
parent 4831b73000
commit 100220418c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 49 additions and 44 deletions

View File

@ -35,8 +35,9 @@ apt install -y sqlite3 unzip
#we are about to move out of the executing directory so we need to preserve it to return after we are done
CWD=$(pwd)
if [ $(echo "$switch_version" | tr -d '.') -gt 1103 ]
then
#install the following dependencies if the switch version is greater than 1.10.0
if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
# libks build-requirements
apt install -y cmake uuid-dev
@ -80,18 +81,22 @@ cd /usr/src
#git clone -b v1.8 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
#1.8 and older
if [ $(echo "$switch_version" | tr -d '.') -lt 1100 ]; then
#wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.zip
#rm -R freeswitch
#unzip freeswitch-$switch_version.zip
#mv freeswitch-$switch_version freeswitch
#cd /usr/src/freeswitch
end
#1.10.0 and newer
if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.-release.zip
unzip freeswitch-$switch_version.-release.zip
rm -R freeswitch
mv freeswitch-$switch_version.-release freeswitch
cd /usr/src/freeswitch
fi
# bootstrap is needed if using git
#./bootstrap.sh -j