2017-03-04 22:15:36 +01:00
|
|
|
#!/bin/sh
|
2017-03-04 22:01:43 +01:00
|
|
|
|
2017-03-04 22:15:36 +01:00
|
|
|
#move to script directory so all relative paths work
|
|
|
|
|
cd "$(dirname "$0")"
|
2017-03-04 22:01:43 +01:00
|
|
|
|
2017-03-04 22:15:36 +01:00
|
|
|
#includes
|
|
|
|
|
. ./config.sh
|
|
|
|
|
|
|
|
|
|
if [ .$switch_source = .true ]; then
|
|
|
|
|
if [ ."$switch_branch" = "master" ]; then
|
2017-03-04 22:01:43 +01:00
|
|
|
resources/switch/source-master.sh
|
|
|
|
|
else
|
|
|
|
|
resources/switch/source-release.sh
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#copy the switch conf files to /etc/freeswitch
|
|
|
|
|
resources/switch/conf-copy.sh
|
|
|
|
|
|
|
|
|
|
#set the file permissions
|
|
|
|
|
resources/switch/source-permissions.sh
|
|
|
|
|
|
|
|
|
|
#systemd service
|
|
|
|
|
resources/switch/source-systemd.sh
|
2017-03-04 22:15:36 +01:00
|
|
|
fi
|
2017-03-04 22:01:43 +01:00
|
|
|
|
2017-03-04 22:15:36 +01:00
|
|
|
if [ .$switch_package = .true ]; then
|
|
|
|
|
if [ ."$switch_branch" = "master" ]; then
|
|
|
|
|
if [ .$switch_package_all = .true ]; then
|
2017-03-04 22:01:43 +01:00
|
|
|
resources/switch/package-master-all.sh
|
|
|
|
|
else
|
|
|
|
|
resources/switch/package-master.sh
|
|
|
|
|
fi
|
|
|
|
|
else
|
2017-03-04 22:15:36 +01:00
|
|
|
if [ .$switch_package_all = .true ]; then
|
2017-03-04 22:01:43 +01:00
|
|
|
resources/switch/package-all.sh
|
|
|
|
|
else
|
|
|
|
|
resources/switch/package-release.sh
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#copy the switch conf files to /etc/freeswitch
|
|
|
|
|
resources/switch/conf-copy.sh
|
|
|
|
|
|
|
|
|
|
#set the file permissions
|
|
|
|
|
resources/switch/package-permissions.sh
|
|
|
|
|
|
|
|
|
|
#systemd service
|
|
|
|
|
resources/switch/package-systemd.sh
|
|
|
|
|
fi
|