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:
parent
8afacd9262
commit
f60848e6e9
|
|
@ -76,34 +76,42 @@ if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
|
||||||
ldconfig
|
ldconfig
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Using version $switch_version"
|
|
||||||
cd /usr/src
|
cd /usr/src
|
||||||
#git clone -b v1.8 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
|
|
||||||
|
|
||||||
#1.8 and older
|
#check for master
|
||||||
if [ $(echo "$switch_version" | tr -d '.') -lt 1100 ]; then
|
if [ $switch_branch = "master" ]; then
|
||||||
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.zip
|
#master branch
|
||||||
rm -R freeswitch
|
echo "Using version master"
|
||||||
unzip freeswitch-$switch_version.zip
|
rm -r /usr/src/freeswitch
|
||||||
mv freeswitch-$switch_version freeswitch
|
git clone https://github.com/signalwire/freeswitch.git
|
||||||
cd /usr/src/freeswitch
|
cd /usr/src/freeswitch
|
||||||
|
./bootstrap.sh -j
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#1.10.0 and newer
|
#check for stable release
|
||||||
if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
|
if [ $switch_branch = "stable" ]; then
|
||||||
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.-release.zip
|
echo "Using version $switch_version"
|
||||||
unzip freeswitch-$switch_version.-release.zip
|
#1.8 and older
|
||||||
rm -R freeswitch
|
if [ $(echo "$switch_version" | tr -d '.') -lt 1100 ]; then
|
||||||
mv freeswitch-$switch_version.-release freeswitch
|
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.zip
|
||||||
cd /usr/src/freeswitch
|
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
|
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
|
# 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_avmd:applications/mod_avmd:'
|
||||||
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_av:formats/mod_av:'
|
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_av:formats/mod_av:'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue