Add ability to build master branch (#400)

Adds the ability to build mater branch by setting the existing variable `$switch_branch` to `master` in config.sh
This commit is contained in:
emak 2022-09-10 11:56:37 -04:00 committed by GitHub
parent 8afacd9262
commit f60848e6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 21 deletions

View File

@ -76,34 +76,42 @@ if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
ldconfig
fi
echo "Using version $switch_version"
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
#check for master
if [ $switch_branch = "master" ]; then
#master branch
echo "Using version master"
rm -r /usr/src/freeswitch
git clone https://github.com/signalwire/freeswitch.git
cd /usr/src/freeswitch
./bootstrap.sh -j
fi
#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
#check for stable release
if [ $switch_branch = "stable" ]; then
echo "Using version $switch_version"
#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
fi
#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
#apply patch
patch -u /usr/src/freeswitch/src/mod/databases/mod_pgsql/mod_pgsql.c -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/mod_pgsql.patch
fi
fi
# bootstrap is needed if using git
#./bootstrap.sh -j
#apply patch
patch -u /usr/src/freeswitch/src/mod/databases/mod_pgsql/mod_pgsql.c -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/mod_pgsql.patch
# enable required modules
#sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_avmd:applications/mod_avmd:'
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_av:formats/mod_av:'